2016-03-18 18:28:55 +00:00
#Sample Apps for Affdex C++ SDK for Windows / Linux
2015-03-09 21:24:59 +00:00
2016-03-18 18:28:55 +00:00
Welcome to our repository on GitHub! Here you will find example code to get you started with our Affdex SDK 3.0 and begin emotion-enabling you own app! Documentation for the SDKs is available on the < a href = http://developer.affectiva.com/ > Affectiva's Developer Portal< / a > .
2015-03-09 21:24:59 +00:00
2016-02-03 12:20:08 +00:00
[![Build status ](https://ci.appveyor.com/api/projects/status/pn2y9h8a3nnkiw41?svg=true )]
(https://ci.appveyor.com/project/ahamino/win-sdk-samples)
2015-03-09 21:24:59 +00:00
2016-02-03 12:20:08 +00:00
Dependencies
------------
2015-03-09 21:24:59 +00:00
2016-03-18 18:28:55 +00:00
*Windows*
2016-02-03 12:20:08 +00:00
- Affdex SDK 3.0 (32 bit)
2015-03-09 21:24:59 +00:00
- Visual Studio 2013 or higher
2016-03-18 18:28:55 +00:00
*Linux*
- Ubuntu 14.04 or higher or CentOS 7 or higher
- Affdex SDK 3.0
- CMake 2.8 or higher
- GCC 4.8 or higher
2015-03-09 21:24:59 +00:00
2016-03-18 18:28:55 +00:00
*Additional dependencies*
2016-02-03 12:20:08 +00:00
- OpenCV 3.1
- Boost 1.59
Installation
------------
2016-03-18 18:28:55 +00:00
- Download Affdex SDK [from here ](http://developer.affectiva.com/downloads )
2016-02-03 12:20:08 +00:00
- Sign up for an evaluation license [by submitting this form ](http://www.affectiva.com/45-day-free-trial/ )
2016-03-18 18:28:55 +00:00
*Windows*
2015-04-21 22:12:54 +00:00
- Install the SDK using MSI installer.
2016-02-03 12:20:08 +00:00
- The additional dependencies get installed automatically by NuGet.
2016-03-18 18:28:55 +00:00
*Ubuntu*
```bashrc
sudo apt-get install build-essential libopencv-dev libboost-dev cmake
wget http://developer.affectiva.com/downloads/linux
mkdir affdex-sdk
tar -xzvf affdex-cpp-sdk-3.0-linux-64bit.tar.gz -C affdex-sdk
export AFFDEX_DATA_DIR=affdex-sdk/data
git clone https://github.com/Affectiva/win-sdk-samples.git
mkdir build
cd build
cmake -DOpenCV_DIR=/usr/local/ -DAFFDEX_DIR=../affdex-sdk ../win-sdk-samples
make
```
2016-02-03 12:20:08 +00:00
2016-02-03 12:22:00 +00:00
OpenCV-webcam-demo (c++)
2016-02-03 12:20:08 +00:00
------------------
Project for demoing the [FrameDetector class ](http://developer.affectiva.com/v3/windows/analyze-frames/ ). It grabs frames from the camera, analyzes them and displays the results on screen.
The following command line arguments can be used to run it:
-h [ --help ] Display this help message.
-d [ --data ] arg (=data) Path to the data folder
-l [ --license ] arg (=test.license) License file.
-r [ --resolution ] arg (=640 480) Resolution in pixels (2-values): width
height
--pfps arg (=30) Processing framerate.
--cfps arg (=30) Camera capture framerate.
--bufferLen arg (=30) process buffer size.
--cid arg (=0) Camera ID.
--faceMode arg (=0) Face detector mode (large faces vs small
faces).
--numFaces arg (=1) Number of faces to be tracked.
--draw arg (=1) Draw metrics on screen.
Video-demo (c++)
----------
Project for demoing the Windows SDK [VideoDetector class ](http://developer.affectiva.com/v3/windows/analyze-video/ ). It processs video files, displays the emotion metrics and exports the results in a csv file.
2015-04-21 22:12:54 +00:00
2016-02-03 12:20:08 +00:00
The following command line arguments can be used to run it:
2015-04-21 22:12:54 +00:00
2016-02-03 12:20:08 +00:00
-h [ --help ] Display this help message.
-d [ --data ] arg (=data) Path to the data folder
-l [ --license ] arg (=test.license) License file.
-i [ --input ] arg Video file to processs
--pfps arg (=30) Processing framerate.
--draw arg (=1) Draw video on screen.
--faceMode arg (=1) Face detector mode (large faces vs small
faces).
--numFaces arg (=1) Number of faces to be tracked.
--loop arg (=0) Loop over the video being processed.
2015-04-21 22:12:54 +00:00
2016-02-03 12:20:08 +00:00
For an example of how to use Affdex in a C# application .. please refer to [AffdexMe ](https://github.com/affectiva/affdexme-win )