mirror of
https://gitcode.com/gh_mirrors/ope/OpenFace.git
synced 2026-05-20 14:17:58 +00:00
Feature/opencv4 (#706)
* Travis OpenCV4 update, testing Ubuntu with new OpenCV * Fix to Ubuntu travis * Another attempt at OpenCV 4.0 for Ubuntu * And another OpenCV attempt. * Simplifying the travis script * Ubuntu OpenCV 4 support. * Updating to OpenCV 4, for x64 windows. * Fixes to move to OpenCV 4 on windows. * Travis fix for OpenCV 4 on OSX * Renaming a lib. * Travis opencv4 fix. * Building OpenCV4 versions using appveyor. * Attempt mac travis fix. * Small travis fix. * Travis fix attempt. * First iteration in boost removal and upgrade to C++17 * Test with ocv 4.0 * Moving filesystem out of stdafx * Some more boost testing with cmake. * More CMAKE options * More compiler flag changes * Another attempt at compiler options. * Another attempt. * More filesystem stuff. * Linking to filesystem. * Cmake fix with target linking. * Attempting travis with g++-8 * Attempting to setup g++8 on travis linux. * Another travis change. * Adding OpenBLAS to travis and removing g++-8 * Fixing typo * More travis experiments. * More travis debugging. * A small directory change. * Adding some more travis changes. * travis typo fix. * Some reordering of travis, for cleaner yml * Removing `using namespace std` in order to avoid clash with byte and to make the code more consistent. * Working towards removing std::filesystem requirement, allow boost::filesystem as well. * Making boost an optional dependency * Fixing std issue. * Fixing cmake issue. * Fixing the precompiled header issue. * Another cmake boost fix. * Including missing files. * Removing unnecessary includes. * Removing more includes. * Changes to appveyor build, proper removal of VS2015 * If boost is present, do not need to link to filesystem. * Removing un-needed link library. * oops * Mac attempt at opencv4 travis. * Upgrading OCV to 4.1 on VS2018 * Downloading OpenCV binaries through a script * Triger an appveyor build. * Upgrading VS version. * Attempting VS2017 build * Adding win-32 libraries for OpenCV 4.1 * Adding OpenCV 32 bit libraries.
This commit is contained in:
committed by
GitHub
parent
330383fef7
commit
9147dfe2f3
@@ -52,16 +52,14 @@
|
||||
#define CONFIG_DIR "~"
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
vector<string> get_arguments(int argc, char **argv)
|
||||
std::vector<std::string> get_arguments(int argc, char **argv)
|
||||
{
|
||||
|
||||
vector<string> arguments;
|
||||
std::vector<std::string> arguments;
|
||||
|
||||
for (int i = 0; i < argc; ++i)
|
||||
{
|
||||
arguments.push_back(string(argv[i]));
|
||||
arguments.push_back(std::string(argv[i]));
|
||||
}
|
||||
return arguments;
|
||||
}
|
||||
@@ -70,13 +68,13 @@ int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
//Convert arguments to more convenient vector form
|
||||
vector<string> arguments = get_arguments(argc, argv);
|
||||
std::vector<std::string> arguments = get_arguments(argc, argv);
|
||||
|
||||
// no arguments: output usage
|
||||
if (arguments.size() == 1)
|
||||
{
|
||||
cout << "For command line arguments see:" << endl;
|
||||
cout << " https://github.com/TadasBaltrusaitis/OpenFace/wiki/Command-line-arguments";
|
||||
std::cout << "For command line arguments see:" << std::endl;
|
||||
std::cout << " https://github.com/TadasBaltrusaitis/OpenFace/wiki/Command-line-arguments";
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -86,7 +84,7 @@ int main(int argc, char **argv)
|
||||
// The sequence reader chooses what to open based on command line arguments provided
|
||||
if (!image_reader.Open(arguments))
|
||||
{
|
||||
cout << "Could not open any images" << endl;
|
||||
std::cout << "Could not open any images" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -94,16 +92,16 @@ int main(int argc, char **argv)
|
||||
LandmarkDetector::FaceModelParameters det_parameters(arguments);
|
||||
|
||||
// The modules that are being used for tracking
|
||||
cout << "Loading the model" << endl;
|
||||
std::cout << "Loading the model" << std::endl;
|
||||
LandmarkDetector::CLNF face_model(det_parameters.model_location);
|
||||
|
||||
if (!face_model.loaded_successfully)
|
||||
{
|
||||
cout << "ERROR: Could not load the landmark detector" << endl;
|
||||
std::cout << "ERROR: Could not load the landmark detector" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Model loaded" << endl;
|
||||
std::cout << "Model loaded" << std::endl;
|
||||
|
||||
// Load facial feature extractor and AU analyser (make sure it is static)
|
||||
FaceAnalysis::FaceAnalyserParameters face_analysis_params(arguments);
|
||||
@@ -118,7 +116,7 @@ int main(int argc, char **argv)
|
||||
// If can't find MTCNN face detector, default to HOG one
|
||||
if (det_parameters.curr_face_detector == LandmarkDetector::FaceModelParameters::MTCNN_DETECTOR && face_detector_mtcnn.empty())
|
||||
{
|
||||
cout << "INFO: defaulting to HOG-SVM face detector" << endl;
|
||||
std::cout << "INFO: defaulting to HOG-SVM face detector" << std::endl;
|
||||
det_parameters.curr_face_detector = LandmarkDetector::FaceModelParameters::HOG_SVM_DETECTOR;
|
||||
}
|
||||
|
||||
@@ -131,15 +129,15 @@ int main(int argc, char **argv)
|
||||
|
||||
if (!face_model.eye_model)
|
||||
{
|
||||
cout << "WARNING: no eye model found" << endl;
|
||||
std::cout << "WARNING: no eye model found" << std::endl;
|
||||
}
|
||||
|
||||
if (face_analyser.GetAUClassNames().size() == 0 && face_analyser.GetAUClassNames().size() == 0)
|
||||
{
|
||||
cout << "WARNING: no Action Unit models found" << endl;
|
||||
std::cout << "WARNING: no Action Unit models found" << std::endl;
|
||||
}
|
||||
|
||||
cout << "Starting tracking" << endl;
|
||||
std::cout << "Starting tracking" << std::endl;
|
||||
while (!rgb_image.empty())
|
||||
{
|
||||
|
||||
@@ -158,7 +156,7 @@ int main(int argc, char **argv)
|
||||
cv::Mat_<uchar> grayscale_image = image_reader.GetGrayFrame();
|
||||
|
||||
// Detect faces in an image
|
||||
vector<cv::Rect_<float> > face_detections;
|
||||
std::vector<cv::Rect_<float> > face_detections;
|
||||
|
||||
if (image_reader.has_bounding_boxes)
|
||||
{
|
||||
@@ -168,7 +166,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
if (det_parameters.curr_face_detector == LandmarkDetector::FaceModelParameters::HOG_SVM_DETECTOR)
|
||||
{
|
||||
vector<float> confidences;
|
||||
std::vector<float> confidences;
|
||||
LandmarkDetector::DetectFacesHOG(face_detections, grayscale_image, face_detector_hog, confidences);
|
||||
}
|
||||
else if (det_parameters.curr_face_detector == LandmarkDetector::FaceModelParameters::HAAR_DETECTOR)
|
||||
@@ -177,7 +175,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
else
|
||||
{
|
||||
vector<float> confidences;
|
||||
std::vector<float> confidences;
|
||||
LandmarkDetector::DetectFacesMTCNN(face_detections, rgb_image, face_detector_mtcnn, confidences);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,34 +23,34 @@
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>FaceLandmarkImg</RootNamespace>
|
||||
<ProjectName>FaceLandmarkImg</ProjectName>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -58,29 +58,25 @@
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost_d.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_x86.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost_d.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_64.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost.props" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_x86.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost.props" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_64.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
@@ -111,6 +107,7 @@
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\lib\local\LandmarkDetector\include;$(SolutionDir)\lib\local\FaceAnalyser\include;$(SolutionDir)\lib\local\GazeAnalyser\include;$(SolutionDir)\lib\local\Utilities\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -127,6 +124,7 @@
|
||||
<EnableEnhancedInstructionSet>
|
||||
</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -147,6 +145,7 @@
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -170,6 +169,7 @@
|
||||
</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
||||
@@ -59,16 +59,14 @@ static void printErrorAndAbort(const std::string & error)
|
||||
#define FATAL_STREAM( stream ) \
|
||||
printErrorAndAbort( std::string( "Fatal error: " ) + stream )
|
||||
|
||||
using namespace std;
|
||||
|
||||
vector<string> get_arguments(int argc, char **argv)
|
||||
std::vector<std::string> get_arguments(int argc, char **argv)
|
||||
{
|
||||
|
||||
vector<string> arguments;
|
||||
std::vector<std::string> arguments;
|
||||
|
||||
for (int i = 0; i < argc; ++i)
|
||||
{
|
||||
arguments.push_back(string(argv[i]));
|
||||
arguments.push_back(std::string(argv[i]));
|
||||
}
|
||||
return arguments;
|
||||
}
|
||||
@@ -76,13 +74,13 @@ vector<string> get_arguments(int argc, char **argv)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
vector<string> arguments = get_arguments(argc, argv);
|
||||
std::vector<std::string> arguments = get_arguments(argc, argv);
|
||||
|
||||
// no arguments: output usage
|
||||
if (arguments.size() == 1)
|
||||
{
|
||||
cout << "For command line arguments see:" << endl;
|
||||
cout << " https://github.com/TadasBaltrusaitis/OpenFace/wiki/Command-line-arguments";
|
||||
std::cout << "For command line arguments see:" << std::endl;
|
||||
std::cout << " https://github.com/TadasBaltrusaitis/OpenFace/wiki/Command-line-arguments";
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -92,13 +90,13 @@ int main(int argc, char **argv)
|
||||
LandmarkDetector::CLNF face_model(det_parameters.model_location);
|
||||
if (!face_model.loaded_successfully)
|
||||
{
|
||||
cout << "ERROR: Could not load the landmark detector" << endl;
|
||||
std::cout << "ERROR: Could not load the landmark detector" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!face_model.eye_model)
|
||||
{
|
||||
cout << "WARNING: no eye model found" << endl;
|
||||
std::cout << "WARNING: no eye model found" << std::endl;
|
||||
}
|
||||
|
||||
// Open a sequence
|
||||
|
||||
@@ -23,34 +23,34 @@
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>FaceLandmarkVid</RootNamespace>
|
||||
<ProjectName>FaceLandmarkVid</ProjectName>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -58,29 +58,25 @@
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost_d.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_x86.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost_d.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_64.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost.props" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_x86.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost.props" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_64.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
@@ -112,6 +108,7 @@
|
||||
<OpenMPSupport>false</OpenMPSupport>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -129,6 +126,7 @@
|
||||
<EnableEnhancedInstructionSet>
|
||||
</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -149,6 +147,7 @@
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -172,6 +171,7 @@
|
||||
<EnableEnhancedInstructionSet>
|
||||
</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
||||
@@ -62,21 +62,19 @@ static void printErrorAndAbort(const std::string & error)
|
||||
#define FATAL_STREAM( stream ) \
|
||||
printErrorAndAbort( std::string( "Fatal error: " ) + stream )
|
||||
|
||||
using namespace std;
|
||||
|
||||
vector<string> get_arguments(int argc, char **argv)
|
||||
std::vector<std::string> get_arguments(int argc, char **argv)
|
||||
{
|
||||
|
||||
vector<string> arguments;
|
||||
std::vector<std::string> arguments;
|
||||
|
||||
for (int i = 0; i < argc; ++i)
|
||||
{
|
||||
arguments.push_back(string(argv[i]));
|
||||
arguments.push_back(std::string(argv[i]));
|
||||
}
|
||||
return arguments;
|
||||
}
|
||||
|
||||
void NonOverlapingDetections(const vector<LandmarkDetector::CLNF>& clnf_models, vector<cv::Rect_<float> >& face_detections)
|
||||
void NonOverlapingDetections(const std::vector<LandmarkDetector::CLNF>& clnf_models, std::vector<cv::Rect_<float> >& face_detections)
|
||||
{
|
||||
|
||||
// Go over the model and eliminate detections that are not informative (there already is a tracker there)
|
||||
@@ -103,13 +101,13 @@ void NonOverlapingDetections(const vector<LandmarkDetector::CLNF>& clnf_models,
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
vector<string> arguments = get_arguments(argc, argv);
|
||||
std::vector<std::string> arguments = get_arguments(argc, argv);
|
||||
|
||||
// no arguments: output usage
|
||||
if (arguments.size() == 1)
|
||||
{
|
||||
cout << "For command line arguments see:" << endl;
|
||||
cout << " https://github.com/TadasBaltrusaitis/OpenFace/wiki/Command-line-arguments";
|
||||
std::cout << "For command line arguments see:" << std::endl;
|
||||
std::cout << " https://github.com/TadasBaltrusaitis/OpenFace/wiki/Command-line-arguments";
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -119,12 +117,12 @@ int main(int argc, char **argv)
|
||||
|
||||
det_params.curr_face_detector = LandmarkDetector::FaceModelParameters::MTCNN_DETECTOR;
|
||||
|
||||
vector<LandmarkDetector::FaceModelParameters> det_parameters;
|
||||
std::vector<LandmarkDetector::FaceModelParameters> det_parameters;
|
||||
det_parameters.push_back(det_params);
|
||||
|
||||
// The modules that are being used for tracking
|
||||
vector<LandmarkDetector::CLNF> face_models;
|
||||
vector<bool> active_models;
|
||||
std::vector<LandmarkDetector::CLNF> face_models;
|
||||
std::vector<bool> active_models;
|
||||
|
||||
int num_faces_max = 4;
|
||||
|
||||
@@ -132,7 +130,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (!face_model.loaded_successfully)
|
||||
{
|
||||
cout << "ERROR: Could not load the landmark detector" << endl;
|
||||
std::cout << "ERROR: Could not load the landmark detector" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -145,7 +143,7 @@ int main(int argc, char **argv)
|
||||
// If can't find MTCNN face detector, default to HOG one
|
||||
if (det_parameters[0].curr_face_detector == LandmarkDetector::FaceModelParameters::MTCNN_DETECTOR && face_model.face_detector_MTCNN.empty())
|
||||
{
|
||||
cout << "INFO: defaulting to HOG-SVM face detector" << endl;
|
||||
std::cout << "INFO: defaulting to HOG-SVM face detector" << std::endl;
|
||||
det_parameters[0].curr_face_detector = LandmarkDetector::FaceModelParameters::HOG_SVM_DETECTOR;
|
||||
}
|
||||
|
||||
@@ -168,12 +166,12 @@ int main(int argc, char **argv)
|
||||
|
||||
if (!face_model.eye_model)
|
||||
{
|
||||
cout << "WARNING: no eye model found" << endl;
|
||||
std::cout << "WARNING: no eye model found" << std::endl;
|
||||
}
|
||||
|
||||
if (face_analyser.GetAUClassNames().size() == 0 && face_analyser.GetAUClassNames().size() == 0)
|
||||
{
|
||||
cout << "WARNING: no Action Unit models found" << endl;
|
||||
std::cout << "WARNING: no Action Unit models found" << std::endl;
|
||||
}
|
||||
|
||||
// Open a sequence
|
||||
@@ -232,7 +230,7 @@ int main(int argc, char **argv)
|
||||
// Reading the images
|
||||
cv::Mat_<uchar> grayscale_image = sequence_reader.GetGrayFrame();
|
||||
|
||||
vector<cv::Rect_<float> > face_detections;
|
||||
std::vector<cv::Rect_<float> > face_detections;
|
||||
|
||||
bool all_models_active = true;
|
||||
for (unsigned int model = 0; model < face_models.size(); ++model)
|
||||
@@ -248,7 +246,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
if (det_parameters[0].curr_face_detector == LandmarkDetector::FaceModelParameters::HOG_SVM_DETECTOR)
|
||||
{
|
||||
vector<float> confidences;
|
||||
std::vector<float> confidences;
|
||||
LandmarkDetector::DetectFacesHOG(face_detections, grayscale_image, face_models[0].face_detector_HOG, confidences);
|
||||
}
|
||||
else if (det_parameters[0].curr_face_detector == LandmarkDetector::FaceModelParameters::HAAR_DETECTOR)
|
||||
@@ -257,7 +255,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
else
|
||||
{
|
||||
vector<float> confidences;
|
||||
std::vector<float> confidences;
|
||||
LandmarkDetector::DetectFacesMTCNN(face_detections, rgb_image, face_models[0].face_detector_MTCNN, confidences);
|
||||
}
|
||||
|
||||
@@ -402,10 +400,10 @@ int main(int argc, char **argv)
|
||||
// Reporting progress
|
||||
if (sequence_reader.GetProgress() >= reported_completion / 10.0)
|
||||
{
|
||||
cout << reported_completion * 10 << "% ";
|
||||
std::cout << reported_completion * 10 << "% ";
|
||||
if (reported_completion == 10)
|
||||
{
|
||||
cout << endl;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
reported_completion = reported_completion + 1;
|
||||
}
|
||||
|
||||
@@ -22,32 +22,32 @@
|
||||
<ProjectGuid>{C3FAF36F-44BC-4454-87C2-C5106575FE50}</ProjectGuid>
|
||||
<RootNamespace>FaceLandmarkVidMulti</RootNamespace>
|
||||
<ProjectName>FaceLandmarkVidMulti</ProjectName>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -57,29 +57,25 @@
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost_d.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_x86.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost_d.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_64.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost.props" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_x86.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost.props" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_64.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
@@ -104,6 +100,7 @@
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\lib\local\LandmarkDetector\include;$(SolutionDir)\lib\local\Utilities\include;$(SolutionDir)\lib\local\FaceAnalyser\include;$(SolutionDir)\lib\local\GazeAnalyser\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -117,6 +114,7 @@
|
||||
<EnableEnhancedInstructionSet>
|
||||
</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -134,6 +132,7 @@
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -155,6 +154,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PreprocessorDefinitions>WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
||||
@@ -68,17 +68,15 @@ static void printErrorAndAbort(const std::string & error)
|
||||
#define FATAL_STREAM( stream ) \
|
||||
printErrorAndAbort( std::string( "Fatal error: " ) + stream )
|
||||
|
||||
using namespace std;
|
||||
|
||||
vector<string> get_arguments(int argc, char **argv)
|
||||
std::vector<std::string> get_arguments(int argc, char **argv)
|
||||
{
|
||||
|
||||
vector<string> arguments;
|
||||
std::vector<std::string> arguments;
|
||||
|
||||
// First argument is reserved for the name of the executable
|
||||
for (int i = 0; i < argc; ++i)
|
||||
{
|
||||
arguments.push_back(string(argv[i]));
|
||||
arguments.push_back(std::string(argv[i]));
|
||||
}
|
||||
return arguments;
|
||||
}
|
||||
@@ -86,13 +84,13 @@ vector<string> get_arguments(int argc, char **argv)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
vector<string> arguments = get_arguments(argc, argv);
|
||||
std::vector<std::string> arguments = get_arguments(argc, argv);
|
||||
|
||||
// no arguments: output usage
|
||||
if (arguments.size() == 1)
|
||||
{
|
||||
cout << "For command line arguments see:" << endl;
|
||||
cout << " https://github.com/TadasBaltrusaitis/OpenFace/wiki/Command-line-arguments";
|
||||
std::cout << "For command line arguments see:" << std::endl;
|
||||
std::cout << " https://github.com/TadasBaltrusaitis/OpenFace/wiki/Command-line-arguments";
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -104,7 +102,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (!face_model.loaded_successfully)
|
||||
{
|
||||
cout << "ERROR: Could not load the landmark detector" << endl;
|
||||
std::cout << "ERROR: Could not load the landmark detector" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -114,12 +112,12 @@ int main(int argc, char **argv)
|
||||
|
||||
if (!face_model.eye_model)
|
||||
{
|
||||
cout << "WARNING: no eye model found" << endl;
|
||||
std::cout << "WARNING: no eye model found" << std::endl;
|
||||
}
|
||||
|
||||
if (face_analyser.GetAUClassNames().size() == 0 && face_analyser.GetAUClassNames().size() == 0)
|
||||
{
|
||||
cout << "WARNING: no Action Unit models found" << endl;
|
||||
std::cout << "WARNING: no Action Unit models found" << std::endl;
|
||||
}
|
||||
|
||||
Utilities::SequenceCapture sequence_reader;
|
||||
@@ -158,7 +156,7 @@ int main(int argc, char **argv)
|
||||
Utilities::RecorderOpenFace open_face_rec(sequence_reader.name, recording_params, arguments);
|
||||
|
||||
if (recording_params.outputGaze() && !face_model.eye_model)
|
||||
cout << "WARNING: no eye model defined, but outputting gaze" << endl;
|
||||
std::cout << "WARNING: no eye model defined, but outputting gaze" << std::endl;
|
||||
|
||||
captured_image = sequence_reader.GetNextFrame();
|
||||
|
||||
@@ -240,10 +238,10 @@ int main(int argc, char **argv)
|
||||
// Reporting progress
|
||||
if (sequence_reader.GetProgress() >= reported_completion / 10.0)
|
||||
{
|
||||
cout << reported_completion * 10 << "% ";
|
||||
std::cout << reported_completion * 10 << "% ";
|
||||
if (reported_completion == 10)
|
||||
{
|
||||
cout << endl;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
reported_completion = reported_completion + 1;
|
||||
}
|
||||
|
||||
@@ -22,34 +22,34 @@
|
||||
<ProjectGuid>{8A23C00D-767D-422D-89A3-CF225E3DAB4B}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>FeatureExtraction</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -57,29 +57,25 @@
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost_d.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_x86.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost_d.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_64.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost.props" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_x86.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost.props" />
|
||||
<Import Project="..\..\lib\3rdParty\dlib\dlib.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenBLAS\OpenBLAS_64.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
@@ -111,6 +107,7 @@
|
||||
<OpenMPSupport>false</OpenMPSupport>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -128,6 +125,7 @@
|
||||
<EnableEnhancedInstructionSet>
|
||||
</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -149,6 +147,7 @@
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -173,6 +172,7 @@
|
||||
</EnableEnhancedInstructionSet>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
||||
@@ -43,14 +43,11 @@
|
||||
|
||||
#include <opencv2/core/core.hpp>
|
||||
#include <opencv2/highgui/highgui.hpp>
|
||||
#include <opencv2/videoio/videoio.hpp> // Video write
|
||||
#include <opencv2/videoio/videoio_c.h> // Video write
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <filesystem.hpp>
|
||||
#include <filesystem/fstream.hpp>
|
||||
#include <filesystem>
|
||||
|
||||
#define INFO_STREAM( stream ) \
|
||||
std::cout << stream << std::endl
|
||||
@@ -70,8 +67,6 @@ static void printErrorAndAbort( const std::string & error )
|
||||
#define FATAL_STREAM( stream ) \
|
||||
printErrorAndAbort( std::string( "Fatal error: " ) + stream )
|
||||
|
||||
using namespace std;
|
||||
|
||||
// Get current date/time, format is YYYY-MM-DD.HH:mm:ss
|
||||
const std::string currentDateTime() {
|
||||
time_t now = time(0);
|
||||
@@ -85,14 +80,14 @@ const std::string currentDateTime() {
|
||||
return buf;
|
||||
}
|
||||
|
||||
vector<string> get_arguments(int argc, char **argv)
|
||||
std::vector<std::string> get_arguments(int argc, char **argv)
|
||||
{
|
||||
|
||||
vector<string> arguments;
|
||||
std::vector<std::string> arguments;
|
||||
|
||||
for(int i = 1; i < argc; ++i)
|
||||
{
|
||||
arguments.push_back(string(argv[i]));
|
||||
arguments.push_back(std::string(argv[i]));
|
||||
}
|
||||
return arguments;
|
||||
}
|
||||
@@ -100,10 +95,10 @@ vector<string> get_arguments(int argc, char **argv)
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
|
||||
vector<string> arguments = get_arguments(argc, argv);
|
||||
std::vector<std::string> arguments = get_arguments(argc, argv);
|
||||
|
||||
// Some initial parameters that can be overriden from command line
|
||||
string outroot, outfile;
|
||||
std::string outroot, outfile;
|
||||
|
||||
TCHAR NPath[200];
|
||||
GetCurrentDirectory(200, NPath);
|
||||
@@ -152,16 +147,16 @@ int main (int argc, char **argv)
|
||||
cv::Mat img;
|
||||
vCap >> img;
|
||||
|
||||
boost::filesystem::path dir(outroot);
|
||||
boost::filesystem::create_directory(dir);
|
||||
std::filesystem::path dir(outroot);
|
||||
std::filesystem::create_directory(dir);
|
||||
|
||||
string out_file = outroot + outfile;
|
||||
std::string out_file = outroot + outfile;
|
||||
// saving the videos
|
||||
cv::VideoWriter video_writer(out_file, CV_FOURCC('D','I','V','X'), 30, img.size(), true);
|
||||
cv::VideoWriter video_writer(out_file, cv::VideoWriter::fourcc('D','I','V','X'), 30, img.size(), true);
|
||||
|
||||
ofstream outlog;
|
||||
outlog.open((outroot + outfile + ".log").c_str(), ios_base::out);
|
||||
outlog << "frame, time(ms)" << endl;
|
||||
std::ofstream outlog;
|
||||
outlog.open((outroot + outfile + ".log").c_str(), std::ios_base::out);
|
||||
outlog << "frame, time(ms)" << std::endl;
|
||||
|
||||
double freq = cv::getTickFrequency();
|
||||
|
||||
@@ -180,7 +175,7 @@ int main (int argc, char **argv)
|
||||
video_writer << img;
|
||||
|
||||
outlog << frameProc + 1 << " " << curr_time;
|
||||
outlog << endl;
|
||||
outlog << std::endl;
|
||||
|
||||
|
||||
cv::imshow("rec", img);
|
||||
|
||||
@@ -21,57 +21,53 @@
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{2D80FA0B-2DE8-4475-BA5A-C08A9E1EDAAC}</ProjectGuid>
|
||||
<RootNamespace>Recording</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost_d.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost_d.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\lib\3rdParty\boost\boost.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV3.4\openCV3.4.props" />
|
||||
<Import Project="..\..\lib\3rdParty\OpenCV\openCV.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@@ -86,6 +82,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -96,6 +93,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -110,6 +108,7 @@
|
||||
<OpenMPSupport>false</OpenMPSupport>
|
||||
<CallingConvention>Cdecl</CallingConvention>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -128,6 +127,7 @@
|
||||
<OpenMPSupport>false</OpenMPSupport>
|
||||
<CallingConvention>Cdecl</CallingConvention>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
||||
Reference in New Issue
Block a user