diff --git a/.travis.yml b/.travis.yml index 8bf4d12..de72154 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,4 +64,5 @@ script: - cd build - cmake -D CMAKE_BUILD_TYPE=RELEASE .. - make -j2 - - ./bin/FaceLandmarkImg -fdir "../videos/" -ofdir "./demo_img/" -oidir "./demo_img/" -wild -q \ No newline at end of file + - cd ../tests + - ./tests.sh \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..12dc828 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,15 @@ +version: 1.0.{build} +branches: + only: + - develop + - master + - feature-travis +configuration: +- Debug +- Release +platform: +- x64 +- x86 +build: + project: OpenFace.sln + verbosity: minimal \ No newline at end of file diff --git a/exe/FaceLandmarkImg/FaceLandmarkImg.cpp b/exe/FaceLandmarkImg/FaceLandmarkImg.cpp index ac9ec43..39e2759 100644 --- a/exe/FaceLandmarkImg/FaceLandmarkImg.cpp +++ b/exe/FaceLandmarkImg/FaceLandmarkImg.cpp @@ -367,7 +367,7 @@ int main (int argc, char **argv) else { cout << "Can't find AU prediction files, exiting" << endl; - return 0; + return 1; } } @@ -386,7 +386,7 @@ int main (int argc, char **argv) if (!exists(loc)) { cout << "Can't find triangulation files, exiting" << endl; - return 0; + return 1; } } diff --git a/exe/FaceLandmarkVid/FaceLandmarkVid.cpp b/exe/FaceLandmarkVid/FaceLandmarkVid.cpp index c2fc023..8e194f1 100644 --- a/exe/FaceLandmarkVid/FaceLandmarkVid.cpp +++ b/exe/FaceLandmarkVid/FaceLandmarkVid.cpp @@ -247,6 +247,7 @@ int main (int argc, char **argv) if (!boost::filesystem::exists(current_file)) { FATAL_STREAM("File does not exist"); + return 1; } current_file = boost::filesystem::path(current_file).generic_string(); @@ -264,7 +265,11 @@ int main (int argc, char **argv) video_capture >> captured_image; } - if( !video_capture.isOpened() ) FATAL_STREAM( "Failed to open video source" ); + if (!video_capture.isOpened()) + { + FATAL_STREAM("Failed to open video source"); + return 1; + } else INFO_STREAM( "Device or file opened"); cv::Mat captured_image; diff --git a/exe/FaceLandmarkVidMulti/FaceLandmarkVidMulti.cpp b/exe/FaceLandmarkVidMulti/FaceLandmarkVidMulti.cpp index 063f89b..a490cb1 100644 --- a/exe/FaceLandmarkVidMulti/FaceLandmarkVidMulti.cpp +++ b/exe/FaceLandmarkVidMulti/FaceLandmarkVidMulti.cpp @@ -219,7 +219,11 @@ int main (int argc, char **argv) video_capture >> captured_image; } - if( !video_capture.isOpened() ) FATAL_STREAM( "Failed to open video source" ); + if (!video_capture.isOpened()) + { + FATAL_STREAM("Failed to open video source"); + return 1; + } else INFO_STREAM( "Device or file opened"); cv::Mat captured_image; diff --git a/exe/FeatureExtraction/FeatureExtraction.cpp b/exe/FeatureExtraction/FeatureExtraction.cpp index f327c21..b7ae968 100644 --- a/exe/FeatureExtraction/FeatureExtraction.cpp +++ b/exe/FeatureExtraction/FeatureExtraction.cpp @@ -337,7 +337,7 @@ int main (int argc, char **argv) if(!exists(loc)) { cout << "Can't find triangulation files, exiting" << endl; - return 0; + return 1; } } @@ -378,7 +378,7 @@ int main (int argc, char **argv) else { cout << "Can't find AU prediction files, exiting" << endl; - return 0; + return 1; } } diff --git a/exe/Recording/Record.cpp b/exe/Recording/Record.cpp index dd19ddf..ff4cc4c 100644 --- a/exe/Recording/Record.cpp +++ b/exe/Recording/Record.cpp @@ -168,7 +168,10 @@ int main (int argc, char **argv) INFO_STREAM( "Attempting to capture from device: " << device ); vCap = cv::VideoCapture( device ); - if( !vCap.isOpened() ) FATAL_STREAM( "Failed to open video source" ); + if (!vCap.isOpened()) { + FATAL_STREAM("Failed to open video source"); + return 1; + } cv::Mat img; vCap >> img; diff --git a/tests/tests.sh b/tests/tests.sh new file mode 100644 index 0000000..82950ab --- /dev/null +++ b/tests/tests.sh @@ -0,0 +1,4 @@ +../build/bin/FaceLandmarkImg -fdir "../videos/" -ofdir "./demo_img/" -oidir "./demo_img/" -wild -q +../build/bin/FaceLandmarkVidMulti -f ../videos/multi_face.avi +../build/bin/FeatureExtraction -rigid -verbose -f "../videos/default.wmv" -of "output_features/default.txt" -simalign output_features/aligned +../build/bin/FaceLandmarkVid -f "../videos/changeLighting.wmv" -f "../videos/0188_03_021_al_pacino.avi" -f "../videos/0217_03_006_alanis_morissette.avi" -f "../videos/0244_03_004_anderson_cooper.avi" \ No newline at end of file