diff --git a/.travis.yml b/.travis.yml index beb9f1b..6b0918d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,7 +65,7 @@ script: - cmake -D CMAKE_BUILD_TYPE=RELEASE .. - make -j2 - ../build/bin/FaceLandmarkImg -fdir "../videos/" -ofdir "./demo_img/" -oidir "./demo_img/" -wild -q - - ../build/bin/FaceLandmarkImg -inroot ../videos -f obama.jpg -outroot data -of obama.txt -op obama.3d -oi obama.bmp -multi_view 1 -wild -q + - ../build/bin/FaceLandmarkImg -inroot ../videos -f Obama.jpg -outroot data -of obama.txt -op obama.3d -oi obama.bmp -multi_view 1 -wild -q - ../build/bin/FaceLandmarkVidMulti -inroot ../videos -f multi_face.avi -outroot output -ov multi_face.avi -q - ../build/bin/FeatureExtraction -f "../videos/1815_01_008_tony_blair.avi" -outroot output_features -ov blair.avi -of "1815_01_008_tony_blair.txt" -simalign aligned -ov feat_test.avi -hogalign hog_test.dat -q - ../build/bin/FaceLandmarkVid -inroot ../videos -f 1815_01_008_tony_blair.avi -f 0188_03_021_al_pacino.avi -f 0217_03_006_alanis_morissette.avi -outroot output_data -ov 1.avi -ov 2.avi -ov 3.avi -q \ No newline at end of file diff --git a/exe/FaceLandmarkImg/FaceLandmarkImg.cpp b/exe/FaceLandmarkImg/FaceLandmarkImg.cpp index b25aabd..931bc84 100644 --- a/exe/FaceLandmarkImg/FaceLandmarkImg.cpp +++ b/exe/FaceLandmarkImg/FaceLandmarkImg.cpp @@ -557,8 +557,14 @@ int main (int argc, char **argv) boost::filesystem::path ext = out_feat_path.extension(); outimage = dir.string() + preferredSlash + fname.string() + string(name) + ext.string(); create_directory_from_file(outimage); - imwrite(outimage, display_image); + bool write_success = cv::imwrite(outimage, display_image); + if (!write_success) + { + cout << "Could not output a processed image" << endl; + return 1; + } + } } @@ -630,7 +636,13 @@ int main (int argc, char **argv) if(!outimage.empty()) { create_directory_from_file(outimage); - imwrite(outimage, display_image); + bool write_success = imwrite(outimage, display_image); + + if (!write_success) + { + cout << "Could not output a processed image" << endl; + return 1; + } } } } diff --git a/exe/FeatureExtraction/FeatureExtraction.cpp b/exe/FeatureExtraction/FeatureExtraction.cpp index dffffa8..b49b143 100644 --- a/exe/FeatureExtraction/FeatureExtraction.cpp +++ b/exe/FeatureExtraction/FeatureExtraction.cpp @@ -621,8 +621,13 @@ int main (int argc, char **argv) std::string preferredSlash = slash.make_preferred().string(); string out_file = output_similarity_align[f_n] + preferredSlash + string(name); - imwrite(out_file, sim_warped_img); - + bool write_success = imwrite(out_file, sim_warped_img); + + if (!write_success) + { + cout << "Could not output similarity aligned image image" << endl; + return 1; + } } // Visualising the tracker