提交 e3826986 编写于 作者: G gineshidalgo99

Fixed bug in tutorial_api_cpp/

上级 e1daa2dd
### Posting rules
1. **Fill** the **Your System Configuration section (all of it!)** if you have some kind of error or performance question.
2. **No** questions about **training**. OpenPose only implements testing.
3. **No** questions about **3rd party libraries**.
1. **Duplicated posts will not be answered**. Check the [FAQ](https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/faq.md) section, other GitHub issues, and general documentation before posting. E.g. **low-speed, out-of-memory, output format, 0-people detected, installation issues, ...**).
2. **Fill** the **Your System Configuration section (all of it or it will not be answered!)** if you are facing an error or unexpected behavior. Feature requests or some other type of posts might not require it.
3. **No questions about training or 3rd party libraries**:
- OpenPose only implements testing.
- Caffe errors/issues, check [Caffe](http://caffe.berkeleyvision.org) documentation.
- CUDA check failed errors: They are usually fixed by re-installing CUDA, then re-installing the proper cuDNN version, and then re-compiling (or re-installing) OpenPose. Otherwise, check for help in CUDA forums.
- OpenCV errors: Install the default/pre-compiled OpenCV or check for online help.
4. **No duplicated** posts.
5. **No** posts about **questions already answered / clearly explained in** the **documentation** (e.g. **no more low-speed nor out-of-memory questions**).
6. Set a **proper issue title**: add the Ubuntu/Windows word and be specific (e.g. do not simple call it: `Compile error`).
7. Only English comments.
Issues/comments which do not follow these rules will be **ignored or removed** with no further clarification.
4. Set a **proper issue title**: add the Ubuntu/Windows keyword and be specific (e.g., do not call it: `Error`).
5. Only English comments.
Posts which do not follow these rules will be **ignored, closed, or reported** with no further clarification.
......
......@@ -185,4 +185,4 @@ Please cite these papers in your publications if it helps your research (the fac
## License
OpenPose is freely available for free non-commercial use, and may be redistributed under these conditions. Please, see the [license](LICENSE) for further details. Interested in a commercial license? Check this [FlintBox link](https://flintbox.com/public/project/47343/). For commercial queries, check the contact information provided in the [FlintBox link](https://flintbox.com/public/project/47343/) and also cc [Yaser Sheikh](http://www.cs.cmu.edu/~yaser/) in that email.
OpenPose is freely available for free non-commercial use, and may be redistributed under these conditions. Please, see the [license](LICENSE) for further details. Interested in a commercial license? Check this [FlintBox link](https://flintbox.com/public/project/47343/). For commercial queries, use the `Directly Contact Organization` section from the [FlintBox link](https://flintbox.com/public/project/47343/) and also send a copy of that message to [Yaser Sheikh](http://www.cs.cmu.edu/~yaser/).
......@@ -14,6 +14,8 @@ OpenPose - Frequently Asked Question (FAQ)
9. [How Should I Link my IP Camera?](#how-should-i-link-my-ip-camera)
10. [Difference between BODY_25 vs. COCO vs. MPI](#difference-between-body_25-vs.-coco-vs.-mpi)
11. [How to Measure the Latency Time?](#how-to-measure-the-latency-time)
12. [Zero People Detected](#zero-people-detected)
13. [CPU Version Too Slow](#cpu-version-too-slow)
......@@ -103,3 +105,17 @@ COCO model will eventually be removed. BODY_25 model is faster, more accurate, a
**Q: How to measure/calculate/estimate the latency/lag time?**
**A**: [Profile](https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md#profiling-speed) the OpenPose speed. For 1-GPU or CPU-only systems (use `--disable_multi_thread` for simplicity in multi-GPU systems for latency measurement), the latency will be roughly the sum of all the reported measurements.
### Zero People Detected
**Q: 0 people detected and displayed in default video and images.**
**A**: This problem occurs when the caffemodel has not been properly downloaded. E.g., if the connection drops when downloading the models. Please, remove the current models in the model folder, and download them manually from the links in [doc/installation.md](./installation.md). Alternatively, remove them and re-run Cmake again.
### CPU Version Too Slow
**Q: The CPU version is insanely slow compared to the GPU version.**
**A**: Yes, that is expected. The CPU version runs at about 0.3 FPS on the COCO model, and at about 0.1 FPS (i.e., about 15 sec / frame) on the default BODY_25 model. Switch to COCO model and/or reduce the `net_resolution` as indicated in [Speed Up, Memory Reduction, and Benchmark](#speed-up-memory-reduction-and-benchmark). Contradictory fact: BODY_25 model is about 5x slower than COCO on CPU-only version, but it is about 40% faster on GPU version.
......@@ -36,12 +36,9 @@ namespace op
{
std::vector<cv::Point2f> points2DVector;
// CALIB_CB_FAST_CHECK -> faster but more false negatives
const auto chessboardFound = cv::findChessboardCorners(image,
gridInnerCorners,
points2DVector,
CV_CALIB_CB_ADAPTIVE_THRESH
| CV_CALIB_CB_NORMALIZE_IMAGE
| CV_CALIB_CB_FILTER_QUADS);
const auto chessboardFound = cv::findChessboardCorners(
image, gridInnerCorners, points2DVector,
CV_CALIB_CB_ADAPTIVE_THRESH | CV_CALIB_CB_NORMALIZE_IMAGE | CV_CALIB_CB_FILTER_QUADS);
return std::make_pair(chessboardFound, points2DVector);
}
......
......@@ -406,14 +406,16 @@ namespace op
error("No camera found.", __LINE__, __FUNCTION__, __FILE__);
}
}
// else
error("Undefined Producer selected.", __LINE__, __FUNCTION__, __FILE__);
return std::shared_ptr<Producer>{};
// Unknown
else if (producerType != ProducerType::None)
error("Undefined Producer selected.", __LINE__, __FUNCTION__, __FILE__);
// None
return nullptr;
}
catch (const std::exception& e)
{
error(e.what(), __LINE__, __FUNCTION__, __FILE__);
return std::shared_ptr<Producer>{};
return nullptr;
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册