mirror of
https://github.com/gosticks/openpose.git
synced 2026-08-16 22:30:19 +00:00
If empty frame, not crashes but exists
This commit is contained in:
@@ -98,7 +98,7 @@ namespace op
|
||||
checkIfTooManyConsecutiveEmptyFrames(mNumberConsecutiveEmptyFrames, datum.cvInputData.empty());
|
||||
}
|
||||
// Check producer is running
|
||||
if (!datumProducerRunning)
|
||||
if (!datumProducerRunning || datum.cvInputData.empty())
|
||||
datums = nullptr;
|
||||
// Increase counter if successful image
|
||||
if (datums != nullptr)
|
||||
|
||||
@@ -144,7 +144,9 @@ namespace op
|
||||
// Process wrong frames
|
||||
if (frame.empty())
|
||||
{
|
||||
log("Empty frame detected.", Priority::Max, __LINE__, __FUNCTION__, __FILE__);
|
||||
log("Empty frame detected, frame number " + std::to_string((int)get(CV_CAP_PROP_POS_FRAMES))
|
||||
+ " of " + std::to_string((int)get(CV_CAP_PROP_FRAME_COUNT)) + ".",
|
||||
Priority::Max, __LINE__, __FUNCTION__, __FILE__);
|
||||
mNumberEmptyFrames++;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user