diff --git a/src/MocapNET2/MocapNET2LiveWebcamDemo/livedemo.cpp b/src/MocapNET2/MocapNET2LiveWebcamDemo/livedemo.cpp index 57ec0ff..1dba274 100644 --- a/src/MocapNET2/MocapNET2LiveWebcamDemo/livedemo.cpp +++ b/src/MocapNET2/MocapNET2LiveWebcamDemo/livedemo.cpp @@ -78,18 +78,30 @@ int main(int argc, char *argv[]) std::cerr<<"Trying to open source ("<> frame; } - Mat frame; - Mat frameCentered; - int itIsTheFirstFrame=1; - cap >> frame; - //We will accept the input resolution and force it //on visualization.. options.width = frame.size().width; @@ -164,8 +176,9 @@ int main(int argc, char *argv[]) { options.loopStartTime = GetTickCountMicrosecondsMN(); - if (itIsTheFirstFrame) { itIsTheFirstFrame=0; } else - { cap >> frame; } + if (options.inputIsSingleImage) { /*Do nothing*/ } else + if (itIsTheFirstFrame) { itIsTheFirstFrame=0; } else + { cap >> frame; } //If we are running in a low-end computer and need to keep in sync with a live video feed we can frame-skip if (options.frameSkip) diff --git a/src/MocapNET2/MocapNETLib2/applicationLogic/parseCommandlineOptions.hpp b/src/MocapNET2/MocapNETLib2/applicationLogic/parseCommandlineOptions.hpp index 022ba7a..c724bd6 100644 --- a/src/MocapNET2/MocapNETLib2/applicationLogic/parseCommandlineOptions.hpp +++ b/src/MocapNET2/MocapNETLib2/applicationLogic/parseCommandlineOptions.hpp @@ -15,6 +15,8 @@ struct MocapNET2Options const char * webcamSource; const char * path; char * datasetPath; + unsigned int inputIsSingleImage; + unsigned int isJSONFile; unsigned int isCSVFile; unsigned int jointEstimatorUsed;