Fixed: video/image not working if negative webcam index

This commit is contained in:
gineshidalgo99
2017-07-19 19:25:30 -04:00
parent fea4fa5820
commit 1ba11234c5
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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!
+2
View File
@@ -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.
+2 -2
View File
@@ -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