提交 185ead43 编写于 作者: G gineshidalgo99

Flag process_real_time threw error with webcam

上级 5d8dcd5f
...@@ -41,3 +41,5 @@ OpenPose Library - Release Notes ...@@ -41,3 +41,5 @@ OpenPose Library - Release Notes
3. Main bugs fixed: 3. Main bugs fixed:
1. All visualization functions moved to same thread, so it works with most OpenCV custom compiled versions. 1. All visualization functions moved to same thread, so it works with most OpenCV custom compiled versions.
2. Fixed error on debug mode: `Too many resources requested for launch`. 2. Fixed error on debug mode: `Too many resources requested for launch`.
3. Bug in Array::getConstCvMat() if mVolume=0, now returning empty cv::Mat.
4. Bug: `--process_real_time` threw error with webcam.
...@@ -67,10 +67,16 @@ namespace op ...@@ -67,10 +67,16 @@ namespace op
try try
{ {
check(fpsMode == ProducerFpsMode::RetrievalFps || fpsMode == ProducerFpsMode::OriginalFps, "Unknown ProducerFpsMode.", __LINE__, __FUNCTION__, __FILE__); check(fpsMode == ProducerFpsMode::RetrievalFps || fpsMode == ProducerFpsMode::OriginalFps, "Unknown ProducerFpsMode.", __LINE__, __FUNCTION__, __FILE__);
check(fpsMode != ProducerFpsMode::OriginalFps || get(CV_CAP_PROP_FPS) > 0, // For webcam, ProducerFpsMode::OriginalFps == ProducerFpsMode::RetrievalFps, since the internal webcam cache will overwrite frames after it gets full
"Selected to keep the source fps but get(CV_CAP_PROP_FPS) <= 0, i.e. the source did not set its fps property.", __LINE__, __FUNCTION__, __FILE__); if (mType == ProducerType::Webcam)
mProducerFpsMode = {ProducerFpsMode::RetrievalFps};
mProducerFpsMode = {fpsMode}; // If no webcam
else
{
check(fpsMode == ProducerFpsMode::RetrievalFps || get(CV_CAP_PROP_FPS) > 0,
"Selected to keep the source fps but get(CV_CAP_PROP_FPS) <= 0, i.e. the source did not set its fps property.", __LINE__, __FUNCTION__, __FILE__);
mProducerFpsMode = {fpsMode};
}
reset(mNumberEmptyFrames, mTrackingFps); reset(mNumberEmptyFrames, mTrackingFps);
} }
catch (const std::exception& e) catch (const std::exception& e)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册