冻结帧检测 openCV python [英] frozen frames detection openCV python

查看:81
本文介绍了冻结帧检测 openCV python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试检测相机正在捕捉冻结帧或黑帧.假设相机正在捕获视频帧,突然同一帧一次又一次地捕获.我花了很长时间来了解这个问题陈述,但我失败了.那么我们如何检测它或针对此问题的任何想法/步骤/程序.

I'm trying to detect camera is capturing frozen frames or black frame. Suppose a camera is capturing video frames and suddenly same frame is capturing again and again. I spend long time to get any idea about this problem statement but i failed. So how we detect it or any idea/steps/procedure for this problem.

推荐答案

这是我解决这个问题的方法.

This was my approach to solve this issue.

冻结帧:计算两个连续帧 np.arrays 中每个像素的 HSV/RGB 绝对差异,并确定对检测冻结帧有效的最大允许差异.

Frozen frames: calculate absolute difference over HSV/RGB per every pixel in two consecutive frames np.arrays and determine max allowed diff that is valid for detecting frozen frames.

黑色帧在整个帧上自然具有非常低(或为零)的 V 值总和.确定整个帧的最大V-sum来确定,低于该值的帧为黑色".

Black frames have naturally very low (or zero) V-value sum over the frame. Determine max V-sum of whole frame to determine, below which the frame is "black".

这篇关于冻结帧检测 openCV python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆