diff --git a/.travis.yml b/.travis.yml index c8f2edc..d4feed9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,6 +65,6 @@ script: - cmake -D CMAKE_BUILD_TYPE=RELEASE .. - make -j2 - ../build/bin/FaceLandmarkImg -fdir "../videos/" -ofdir "./demo_img/" -oidir "./demo_img/" -wild -q - - ../build/bin/FaceLandmarkVidMulti -f ../videos/multi_face.avi -q - - ../build/bin/FeatureExtraction -rigid -verbose -f "../videos/1815_01_008_tony_blair.avi" -of "output_features/1815_01_008_tony_blair.txt" -simalign output_features/aligned -q + - ../build/bin/FaceLandmarkVidMulti -f ../videos/multi_face.avi -ov multi_face.avi -q + - ../build/bin/FeatureExtraction -rigid -verbose -f "../videos/1815_01_008_tony_blair.avi" -ov blair.avi -of "output_features/1815_01_008_tony_blair.txt" -simalign output_features/aligned -ov feat_test.avi -hogalign hog_test.dat -q - ../build/bin/FaceLandmarkVid -f "../videos/1815_01_008_tony_blair.avi" -f "../videos/0188_03_021_al_pacino.avi" -f "../videos/0217_03_006_alanis_morissette.avi" -f "../videos/0244_03_004_anderson_cooper.avi" -q \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 1a5050b..5594b78 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,6 +4,7 @@ branches: - develop - master - feature-travis +max_jobs: 4 configuration: - Debug - Release @@ -21,6 +22,6 @@ test_script: - cmd: if exist Release (cd Release) - cmd: dir - cmd: if exist "../videos" (FaceLandmarkImg.exe -fdir "../videos/" -ofdir "./demo_img/" -oidir "./demo_img/" -wild -q) else (FaceLandmarkImg.exe -fdir "../../videos/" -ofdir "./demo_img/" -oidir "./demo_img/" -wild -q) - - cmd: if exist "../videos" (FaceLandmarkVidMulti.exe -f ../videos/multi_face.avi -q) else (FaceLandmarkVidMulti.exe -f ../../videos/multi_face.avi -q) - - cmd: if exist "../videos" (FeatureExtraction.exe -rigid -verbose -f "../videos/1815_01_008_tony_blair.avi" -of "output_features/1815_01_008_tony_blair.txt" -simalign output_features/aligned -q) else (FeatureExtraction.exe -rigid -verbose -f "../../videos/1815_01_008_tony_blair.avi" -of "output_features/1815_01_008_tony_blair.txt" -simalign output_features/aligned -q) - - cmd: if exist "../videos" (FaceLandmarkVid.exe -f "../videos/1815_01_008_tony_blair.avi" -q) else (FaceLandmarkVid.exe -f "../../videos/1815_01_008_tony_blair.avi" -q) + - cmd: if exist "../videos" (FaceLandmarkVidMulti.exe -f ../videos/multi_face.avi -ov multi_face.avi -q) else (FaceLandmarkVidMulti.exe -f ../../videos/multi_face.avi -ov multi_face.avi -q) + - cmd: if exist "../videos" (FeatureExtraction.exe -rigid -f "../videos/1815_01_008_tony_blair.avi" -of "output_features/1815_01_008_tony_blair.txt" -simalign output_features/aligned -ov feat_track.avi -hogalign hog_test.dat -q) else (FeatureExtraction.exe -rigid -f "../../videos/1815_01_008_tony_blair.avi" -of "output_features/1815_01_008_tony_blair.txt" -simalign output_features/aligned -ov feat_track.avi -hogalign hog_test.dat -q) + - cmd: if exist "../videos" (FaceLandmarkVid.exe -f "../videos/1815_01_008_tony_blair.avi" -ov track.avi -q) else (FaceLandmarkVid.exe -f "../../videos/1815_01_008_tony_blair.avi" -ov track.avi -q) diff --git a/exe/FaceLandmarkVidMulti/FaceLandmarkVidMulti.cpp b/exe/FaceLandmarkVidMulti/FaceLandmarkVidMulti.cpp index a490cb1..4a9e6fe 100644 --- a/exe/FaceLandmarkVidMulti/FaceLandmarkVidMulti.cpp +++ b/exe/FaceLandmarkVidMulti/FaceLandmarkVidMulti.cpp @@ -416,7 +416,7 @@ int main (int argc, char **argv) sprintf(fpsC, "%d", (int)fps); string fpsSt("FPS:"); fpsSt += fpsC; - cv::putText(disp_image, fpsSt, cv::Point(10,20), CV_FONT_HERSHEY_SIMPLEX, 0.5, CV_RGB(255,0,0)); + cv::putText(disp_image, fpsSt, cv::Point(10,20), CV_FONT_HERSHEY_SIMPLEX, 0.5, CV_RGB(255,0,0), 1, CV_AA); int num_active_models = 0; @@ -432,7 +432,7 @@ int main (int argc, char **argv) sprintf(active_m_C, "%d", num_active_models); string active_models_st("Active models:"); active_models_st += active_m_C; - cv::putText(disp_image, active_models_st, cv::Point(10,60), CV_FONT_HERSHEY_SIMPLEX, 0.5, CV_RGB(255,0,0)); + cv::putText(disp_image, active_models_st, cv::Point(10,60), CV_FONT_HERSHEY_SIMPLEX, 0.5, CV_RGB(255,0,0), 1, CV_AA); if(!det_parameters[0].quiet_mode) { diff --git a/exe/FeatureExtraction/FeatureExtraction.cpp b/exe/FeatureExtraction/FeatureExtraction.cpp index 76829c6..8100158 100644 --- a/exe/FeatureExtraction/FeatureExtraction.cpp +++ b/exe/FeatureExtraction/FeatureExtraction.cpp @@ -215,7 +215,7 @@ void visualise_tracking(cv::Mat& captured_image, const LandmarkDetector::CLNF& f std::sprintf(fpsC, "%d", (int)fps_tracker); string fpsSt("FPS:"); fpsSt += fpsC; - cv::putText(captured_image, fpsSt, cv::Point(10, 20), CV_FONT_HERSHEY_SIMPLEX, 0.5, CV_RGB(255, 0, 0)); + cv::putText(captured_image, fpsSt, cv::Point(10, 20), CV_FONT_HERSHEY_SIMPLEX, 0.5, CV_RGB(255, 0, 0), 1, CV_AA); if (!det_parameters.quiet_mode) { diff --git a/lib/local/LandmarkDetector/src/LandmarkDetectorUtils.cpp b/lib/local/LandmarkDetector/src/LandmarkDetectorUtils.cpp index a44540c..6361960 100644 --- a/lib/local/LandmarkDetector/src/LandmarkDetectorUtils.cpp +++ b/lib/local/LandmarkDetector/src/LandmarkDetectorUtils.cpp @@ -862,7 +862,7 @@ void DrawBox(cv::Mat image, cv::Vec6d pose, cv::Scalar color, int thickness, flo // Only draw the line if one of the points is inside the image if(p1.inside(image_rect) || p2.inside(image_rect)) { - cv::line(image, p1, p2, color, thickness); + cv::line(image, p1, p2, color, thickness, CV_AA); } } @@ -944,7 +944,7 @@ void DrawBox(vector> lines, cv::Mat image, cv::Scalar // Only draw the line if one of the points is inside the image if(p1.inside(image_rect) || p2.inside(image_rect)) { - cv::line(image, p1, p2, color, thickness); + cv::line(image, p1, p2, color, thickness, CV_AA); } } @@ -1033,8 +1033,8 @@ void Draw(cv::Mat img, const cv::Mat_& shape2D, const cv::Mat_& vis int thickness = (int)std::ceil(3.0* ((double)img.cols) / 640.0); int thickness_2 = (int)std::ceil(1.0* ((double)img.cols) / 640.0); - cv::circle(img, featurePoint, 1, cv::Scalar(0,0,255), thickness); - cv::circle(img, featurePoint, 1, cv::Scalar(255,0,0), thickness_2); + cv::circle(img, featurePoint, 1, cv::Scalar(0,0,255), thickness, CV_AA); + cv::circle(img, featurePoint, 1, cv::Scalar(255,0,0), thickness_2, CV_AA); } } } @@ -1058,9 +1058,9 @@ void Draw(cv::Mat img, const cv::Mat_& shape2D, const cv::Mat_& vis cv::Point nextFeaturePoint((int)shape2D.at(next_point), (int)shape2D.at(next_point+n)); if( i < 8 || i > 19) - cv::line(img, featurePoint, nextFeaturePoint, cv::Scalar(255, 0, 0), thickness_2); + cv::line(img, featurePoint, nextFeaturePoint, cv::Scalar(255, 0, 0), thickness_2, CV_AA); else - cv::line(img, featurePoint, nextFeaturePoint, cv::Scalar(0, 0, 255), thickness_2); + cv::line(img, featurePoint, nextFeaturePoint, cv::Scalar(0, 0, 255), thickness_2, CV_AA); //cv::circle(img, featurePoint, 1, Scalar(0,255,0), thickness); //cv::circle(img, featurePoint, 1, Scalar(0,0,255), thickness_2); @@ -1086,7 +1086,7 @@ void Draw(cv::Mat img, const cv::Mat_& shape2D, const cv::Mat_& vis next_point = 0; cv::Point nextFeaturePoint((int)shape2D.at(next_point), (int)shape2D.at(next_point+n)); - cv::line(img, featurePoint, nextFeaturePoint, cv::Scalar(255, 0, 0), thickness_2); + cv::line(img, featurePoint, nextFeaturePoint, cv::Scalar(255, 0, 0), thickness_2, CV_AA); } } } @@ -1121,8 +1121,8 @@ void Draw(cv::Mat img, const cv::Mat_& shape2D) int thickness = (int)std::ceil(5.0* ((double)img.cols) / 640.0); int thickness_2 = (int)std::ceil(1.5* ((double)img.cols) / 640.0); - cv::circle(img, featurePoint, 1, cv::Scalar(0,0,255), thickness); - cv::circle(img, featurePoint, 1, cv::Scalar(255,0,0), thickness_2); + cv::circle(img, featurePoint, 1, cv::Scalar(0,0,255), thickness, CV_AA); + cv::circle(img, featurePoint, 1, cv::Scalar(255,0,0), thickness_2, CV_AA); } @@ -1155,8 +1155,8 @@ void DrawLandmarks(cv::Mat img, vector landmarks) int thickness = (int)std::ceil(5.0* ((double)img.cols) / 640.0); int thickness_2 = (int)std::ceil(1.5* ((double)img.cols) / 640.0); - cv::circle(img, p, 1, cv::Scalar(0,0,255), thickness); - cv::circle(img, p, 1, cv::Scalar(255,0,0), thickness_2); + cv::circle(img, p, 1, cv::Scalar(0,0,255), thickness, CV_AA); + cv::circle(img, p, 1, cv::Scalar(255,0,0), thickness_2, CV_AA); } }