From 1ba11234c55404588bce533045eb16c13ddbb2bb Mon Sep 17 00:00:00 2001 From: gineshidalgo99 Date: Wed, 19 Jul 2017 19:25:30 -0400 Subject: [PATCH] Fixed: video/image not working if negative webcam index --- README.md | 2 +- doc/release_notes.md | 2 ++ src/openpose/utilities/flagsToOpenPose.cpp | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4dc9b151..ae51fbf2 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ OpenPose ## Introduction -OpenPose is a **library for real-time multi-person keypoint detection and multi-threading written in C++** using OpenCV and Caffe*, authored by [Gines Hidalgo](https://www.linkedin.com/in/gineshidalgo/), [Zhe Cao](http://www.andrew.cmu.edu/user/zhecao), [Tomas Simon](http://www.cs.cmu.edu/~tsimon/), [Shih-En Wei](https://scholar.google.com/citations?user=sFQD3k4AAAAJ&hl=en), [Hanbyul Joo](http://www.cs.cmu.edu/~hanbyulj/) and [Yaser Sheikh](http://www.cs.cmu.edu/~yaser/). +OpenPose is a **library for real-time multi-person keypoint detection and multi-threading written in C++** using OpenCV and Caffe*, authored by [Gines Hidalgo](http://gines-hidalgo.site123.me/), [Zhe Cao](http://www.andrew.cmu.edu/user/zhecao), [Tomas Simon](http://www.cs.cmu.edu/~tsimon/), [Shih-En Wei](https://scholar.google.com/citations?user=sFQD3k4AAAAJ&hl=en), [Hanbyul Joo](http://www.cs.cmu.edu/~hanbyulj/) and [Yaser Sheikh](http://www.cs.cmu.edu/~yaser/). \* It uses Caffe, but the code is ready to be ported to other frameworks (Tensorflow, Torch, etc.). If you implement any of those, feel free to make a pull request! diff --git a/doc/release_notes.md b/doc/release_notes.md index 8ca687e9..ddb66d66 100644 --- a/doc/release_notes.md +++ b/doc/release_notes.md @@ -90,6 +90,8 @@ OpenPose Library - Release Notes 3. Added OpenPose 1.0.1 portable demo. 4. Removed Python and some unnecessary boost dependencies on the VS project. 5. Replaced all double quotes by angle brackets in include statements (issue #61). + 6. Added 3-D reconstruction demo. + 7. Auto-detection of the camera index. 2. Main bugs fixed: 1. Pycaffe can now be imported from Python. 2. Fixed `Tutorial/Wrapper` VS linking errors. diff --git a/src/openpose/utilities/flagsToOpenPose.cpp b/src/openpose/utilities/flagsToOpenPose.cpp index a26bcfa7..37e9f52a 100644 --- a/src/openpose/utilities/flagsToOpenPose.cpp +++ b/src/openpose/utilities/flagsToOpenPose.cpp @@ -67,9 +67,9 @@ namespace op // Avoid duplicates (e.g. selecting at the time camera & video) if (!imageDirectory.empty() && !videoPath.empty()) error("Selected simultaneously image directory and video. Please, select only one.", __LINE__, __FUNCTION__, __FILE__); - else if (!imageDirectory.empty() && webcamIndex != 0) + else if (!imageDirectory.empty() && webcamIndex > 0) error("Selected simultaneously image directory and webcam. Please, select only one.", __LINE__, __FUNCTION__, __FILE__); - else if (!videoPath.empty() && webcamIndex != 0) + else if (!videoPath.empty() && webcamIndex > 0) error("Selected simultaneously video and webcam. Please, select only one.", __LINE__, __FUNCTION__, __FILE__); // Get desired ProducerType -- GitLab