More testing and prettier drawing on images (with anti-aliasing)
This commit is contained in:
parent
0445a97b0c
commit
ee15ecbc46
5 changed files with 20 additions and 19 deletions
|
@ -65,6 +65,6 @@ script:
|
||||||
- cmake -D CMAKE_BUILD_TYPE=RELEASE ..
|
- cmake -D CMAKE_BUILD_TYPE=RELEASE ..
|
||||||
- make -j2
|
- make -j2
|
||||||
- ../build/bin/FaceLandmarkImg -fdir "../videos/" -ofdir "./demo_img/" -oidir "./demo_img/" -wild -q
|
- ../build/bin/FaceLandmarkImg -fdir "../videos/" -ofdir "./demo_img/" -oidir "./demo_img/" -wild -q
|
||||||
- ../build/bin/FaceLandmarkVidMulti -f ../videos/multi_face.avi -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" -of "output_features/1815_01_008_tony_blair.txt" -simalign output_features/aligned -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
|
- ../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
|
|
@ -4,6 +4,7 @@ branches:
|
||||||
- develop
|
- develop
|
||||||
- master
|
- master
|
||||||
- feature-travis
|
- feature-travis
|
||||||
|
max_jobs: 4
|
||||||
configuration:
|
configuration:
|
||||||
- Debug
|
- Debug
|
||||||
- Release
|
- Release
|
||||||
|
@ -21,6 +22,6 @@ test_script:
|
||||||
- cmd: if exist Release (cd Release)
|
- cmd: if exist Release (cd Release)
|
||||||
- cmd: dir
|
- 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" (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" (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 -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" (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" -q) else (FaceLandmarkVid.exe -f "../../videos/1815_01_008_tony_blair.avi" -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)
|
||||||
|
|
|
@ -416,7 +416,7 @@ int main (int argc, char **argv)
|
||||||
sprintf(fpsC, "%d", (int)fps);
|
sprintf(fpsC, "%d", (int)fps);
|
||||||
string fpsSt("FPS:");
|
string fpsSt("FPS:");
|
||||||
fpsSt += fpsC;
|
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;
|
int num_active_models = 0;
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ int main (int argc, char **argv)
|
||||||
sprintf(active_m_C, "%d", num_active_models);
|
sprintf(active_m_C, "%d", num_active_models);
|
||||||
string active_models_st("Active models:");
|
string active_models_st("Active models:");
|
||||||
active_models_st += active_m_C;
|
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)
|
if(!det_parameters[0].quiet_mode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -215,7 +215,7 @@ void visualise_tracking(cv::Mat& captured_image, const LandmarkDetector::CLNF& f
|
||||||
std::sprintf(fpsC, "%d", (int)fps_tracker);
|
std::sprintf(fpsC, "%d", (int)fps_tracker);
|
||||||
string fpsSt("FPS:");
|
string fpsSt("FPS:");
|
||||||
fpsSt += fpsC;
|
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)
|
if (!det_parameters.quiet_mode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
// Only draw the line if one of the points is inside the image
|
||||||
if(p1.inside(image_rect) || p2.inside(image_rect))
|
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<pair<cv::Point, cv::Point>> lines, cv::Mat image, cv::Scalar
|
||||||
// Only draw the line if one of the points is inside the image
|
// Only draw the line if one of the points is inside the image
|
||||||
if(p1.inside(image_rect) || p2.inside(image_rect))
|
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_<double>& shape2D, const cv::Mat_<int>& vis
|
||||||
int thickness = (int)std::ceil(3.0* ((double)img.cols) / 640.0);
|
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);
|
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(0,0,255), thickness, CV_AA);
|
||||||
cv::circle(img, featurePoint, 1, cv::Scalar(255,0,0), thickness_2);
|
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_<double>& shape2D, const cv::Mat_<int>& vis
|
||||||
|
|
||||||
cv::Point nextFeaturePoint((int)shape2D.at<double>(next_point), (int)shape2D.at<double>(next_point+n));
|
cv::Point nextFeaturePoint((int)shape2D.at<double>(next_point), (int)shape2D.at<double>(next_point+n));
|
||||||
if( i < 8 || i > 19)
|
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
|
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,255,0), thickness);
|
||||||
//cv::circle(img, featurePoint, 1, Scalar(0,0,255), thickness_2);
|
//cv::circle(img, featurePoint, 1, Scalar(0,0,255), thickness_2);
|
||||||
|
@ -1086,7 +1086,7 @@ void Draw(cv::Mat img, const cv::Mat_<double>& shape2D, const cv::Mat_<int>& vis
|
||||||
next_point = 0;
|
next_point = 0;
|
||||||
|
|
||||||
cv::Point nextFeaturePoint((int)shape2D.at<double>(next_point), (int)shape2D.at<double>(next_point+n));
|
cv::Point nextFeaturePoint((int)shape2D.at<double>(next_point), (int)shape2D.at<double>(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_<double>& shape2D)
|
||||||
int thickness = (int)std::ceil(5.0* ((double)img.cols) / 640.0);
|
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);
|
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(0,0,255), thickness, CV_AA);
|
||||||
cv::circle(img, featurePoint, 1, cv::Scalar(255,0,0), thickness_2);
|
cv::circle(img, featurePoint, 1, cv::Scalar(255,0,0), thickness_2, CV_AA);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1155,8 +1155,8 @@ void DrawLandmarks(cv::Mat img, vector<cv::Point> landmarks)
|
||||||
int thickness = (int)std::ceil(5.0* ((double)img.cols) / 640.0);
|
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);
|
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(0,0,255), thickness, CV_AA);
|
||||||
cv::circle(img, p, 1, cv::Scalar(255,0,0), thickness_2);
|
cv::circle(img, p, 1, cv::Scalar(255,0,0), thickness_2, CV_AA);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue