Update opencv test app to new sdk changes
This commit is contained in:
parent
991cf686c7
commit
eaa8a4e845
1 changed files with 4 additions and 16 deletions
|
@ -70,25 +70,12 @@ int main(int argsc, char ** argsv)
|
|||
|
||||
try{
|
||||
// Parse and check the data folder (with assets)
|
||||
std::wstring DATA_FOLDER = L"data";
|
||||
if (argsc > 1)
|
||||
{
|
||||
std::string user_folder(argsv[1]);
|
||||
DATA_FOLDER.assign(user_folder.begin(), user_folder.end());
|
||||
}
|
||||
const std::wstring AFFDEX_DATA_DIR = L"C:\\Program Files (x86)\\Affectiva\\Affdex SDK\\data";
|
||||
const std::wstring AFFDEX_LICENSE_FILE = L"affdex.license";
|
||||
|
||||
int framerate = 30;
|
||||
int process_frame_rate = 30;
|
||||
int buffer_length = 2;
|
||||
if (argsc > 2)
|
||||
{
|
||||
framerate = stoi(argsv[2]);
|
||||
}
|
||||
|
||||
if (argsc > 3)
|
||||
{
|
||||
process_frame_rate = stoi(argsv[3]);
|
||||
}
|
||||
|
||||
FrameDetector frameDetector(buffer_length, process_frame_rate); // Init the FrameDetector Class
|
||||
shared_ptr<ImageListener> listenPtr(new PlottingImageListener()); // Instanciate the ImageListener class
|
||||
|
@ -110,7 +97,8 @@ int main(int argsc, char ** argsv)
|
|||
frameDetector.setDetectLipCornerDepressor(true);
|
||||
frameDetector.setDetectEngagement(true);
|
||||
frameDetector.setDetectValence(true);
|
||||
frameDetector.setClassifierPath(DATA_FOLDER);
|
||||
frameDetector.setClassifierPath(AFFDEX_DATA_DIR);
|
||||
frameDetector.setLicensePath(AFFDEX_LICENSE_FILE);
|
||||
frameDetector.setImageListener(listenPtr.get());
|
||||
//Start the frame detector thread.
|
||||
frameDetector.start();
|
||||
|
|
Loading…
Reference in a new issue