diff --git a/dataset/test.jpg b/dataset/test.jpg new file mode 100644 index 0000000..ba52057 Binary files /dev/null and b/dataset/test.jpg differ diff --git a/src/MocapNET2/MocapNET2LiveWebcamDemo/livedemo.cpp b/src/MocapNET2/MocapNET2LiveWebcamDemo/livedemo.cpp index 1dba274..8002e66 100644 --- a/src/MocapNET2/MocapNET2LiveWebcamDemo/livedemo.cpp +++ b/src/MocapNET2/MocapNET2LiveWebcamDemo/livedemo.cpp @@ -79,6 +79,7 @@ int main(int argc, char *argv[]) VideoCapture cap(options.webcamSource); // open the default camera int itIsTheFirstFrame=1; + Mat singleImageFrame; Mat frame; Mat frameCentered; @@ -88,10 +89,10 @@ int main(int argc, char *argv[]) ) { std::cerr<<"Source seems to be a single image ("<> frame; } + if (options.inputIsSingleImage) { singleImageFrame.copyTo(frame); } 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)