Removing licensing from the SDK and some cleanup (#11)

This commit is contained in:
Umang Mehta 2016-09-13 13:23:03 -04:00 committed by Abdelrahman Mahmoud
parent d7ea4348ce
commit dd4b7e9929
3 changed files with 1 additions and 19 deletions

View file

@ -29,7 +29,6 @@ Installation
------------
- Download Affdex SDK [from here](http://developer.affectiva.com/downloads)
- Sign up for an evaluation license [by submitting this form](http://www.affectiva.com/45-day-free-trial/)
*Windows*
- Install the SDK using MSI installer.
@ -61,7 +60,6 @@ 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.
@ -82,7 +80,6 @@ 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.
-i [ --input ] arg Video or photo file to process.
--pfps arg (=30) Processing framerate.
--draw arg (=1) Draw video on screen.

View file

@ -34,7 +34,6 @@ int main(int argsc, char ** argsv)
const std::vector<int> DEFAULT_RESOLUTION{ 640, 480 };
affdex::path DATA_FOLDER;
affdex::path LICENSE_PATH;
std::vector<int> resolution;
int process_framerate = 30;
@ -57,10 +56,8 @@ int main(int argsc, char ** argsv)
("help,h", po::bool_switch()->default_value(false), "Display this help message.")
#ifdef _WIN32
("data,d", po::wvalue< affdex::path >(&DATA_FOLDER)->default_value(affdex::path(L"data"), std::string("data")), "Path to the data folder")
("license,l", po::wvalue< affdex::path >(&LICENSE_PATH)->default_value(affdex::path(L"test.license"), std::string("test.license")), "License file.")
#else // _WIN32
("data,d", po::value< affdex::path >(&DATA_FOLDER)->default_value(affdex::path("data"), std::string("data")), "Path to the data folder")
("license,l", po::value< affdex::path >(&LICENSE_PATH)->default_value(affdex::path("test.license"), std::string("test.license")), "License file.")
#endif // _WIN32
("resolution,r", po::value< std::vector<int> >(&resolution)->default_value(DEFAULT_RESOLUTION, "640 480")->multitoken(), "Resolution in pixels (2-values): width height")
("pfps", po::value< int >(&process_framerate)->default_value(30), "Processing framerate.")
@ -96,14 +93,6 @@ int main(int argsc, char ** argsv)
std::cerr << description << std::endl;
return 1;
}
if (!boost::filesystem::exists(LICENSE_PATH))
{
std::cerr << "License file " << std::string(LICENSE_PATH.begin(), LICENSE_PATH.end()) << " doesnt exist." << std::endl << std::endl;;
std::cerr << "Try specifying the folder through the command line" << std::endl;
std::cerr << description << std::endl;
return 1;
}
if (resolution.size() != 2)
{
std::cerr << "Only two numbers must be specified for resolution." << std::endl;
@ -129,7 +118,6 @@ int main(int argsc, char ** argsv)
frameDetector->setDetectAllEmojis(true);
frameDetector->setDetectAllAppearances(true);
frameDetector->setClassifierPath(DATA_FOLDER);
frameDetector->setLicensePath(LICENSE_PATH);
frameDetector->setImageListener(listenPtr.get());
frameDetector->setFaceListener(faceListenPtr.get());
frameDetector->setProcessStatusListener(videoListenPtr.get());

View file

@ -33,8 +33,8 @@ int main(int argsc, char ** argsv)
{boost::filesystem::path(".wmv"), 1},
{boost::filesystem::path(".mp4"), 1} };
affdex::path DATA_FOLDER;
affdex::path LICENSE_PATH;
affdex::path videoPath;
int process_framerate = 30;
bool draw_display = true;
bool loop = false;
@ -51,11 +51,9 @@ int main(int argsc, char ** argsv)
("help,h", po::bool_switch()->default_value(false), "Display this help message.")
#ifdef _WIN32
("data,d", po::wvalue< affdex::path >(&DATA_FOLDER)->default_value(affdex::path(L"data"), std::string("data")), "Path to the data folder")
("license,l", po::wvalue< affdex::path >(&LICENSE_PATH)->default_value(affdex::path(L"test.license"), std::string("test.license")), "License file.")
("input,i", po::wvalue< affdex::path >(&videoPath)->required(), "Video file to processs")
#else // _WIN32
("data,d", po::value< affdex::path >(&DATA_FOLDER)->default_value(affdex::path("data"), std::string("data")), "Path to the data folder")
("license,l", po::value< affdex::path >(&LICENSE_PATH)->default_value(affdex::path("test.license"), std::string("test.license")), "License file.")
("input,i", po::value< affdex::path >(&videoPath)->required(), "Video file to processs")
#endif // _WIN32
("pfps", po::value< int >(&process_framerate)->default_value(30), "Processing framerate.")
@ -142,7 +140,6 @@ int main(int argsc, char ** argsv)
detector->setDetectAllEmojis(true);
detector->setDetectAllAppearances(true);
detector->setClassifierPath(DATA_FOLDER);
detector->setLicensePath(LICENSE_PATH);
detector->setImageListener(listenPtr.get());