aardio 文档

av.video.flicker 库模块帮助文档

av.video.flicker 成员列表 #

单帧闪烁检测:找某一帧在局部区域里比前后帧都突兀地更强或更弱的“闪现”

av.video.flicker.scanFile(path,exclude,opt) #

扫描视频文件,返回 事件数组,检测器;
exclude(frame,time) 可选,返回 true(整帧不查)或区域数组 {{x0;y0;x1;y1}}(像素)

av.video 成员列表 #

av.video.flicker(width,height,opt) #

创建检测器;opt: grid(短边格数,默认 36),threshold(默认 1),step(采样步长,默认按格子大小),
windows({{窗口格数,阈值,通道},...},通道 "sd"(默认)或 "mean"),
verify(默认 true:超过阈值的候选做运动补偿复核,平移能解释、且前后帧也在动的归入 motion 而不报闪现)

返回对象:avVideoFlickerObject

avVideoFlickerObject 成员列表 #

avVideoFlickerObject.add(buf,stride,exclude) #

按顺序送入一帧(自上而下 BGRA,buffer 或指针);
exclude: true 整帧不查,或区域数组 {{x0;y0;x1;y1}}(像素)

avVideoFlickerObject.cols #

格子列数

avVideoFlickerObject.events #

闪现事件数组

avVideoFlickerObject.finish() #

结束并返回闪现事件数组(相邻 2 帧内位置重叠的只留最强的):{frame;score;sign;x;y;width;height;window;channel}
score ≥1 即超过阈值;sign +1 为突然更强(如首帧误用完全不透明),-1 为突然更弱(如丢帧);
做过运动复核的带 motionRatio(平移后残差比)、motionSpeed(像素/帧),平移解释得了但前后帧不动(单帧丢失/错位)的另带 motionOuter

avVideoFlickerObject.frames #

已送入的帧数

avVideoFlickerObject.motion #

快速运动时间段(finish 后):{from;to;frames;maxScore;speed;x;y;width;height},frame 计;speed 为像素/帧;
超过阈值、但用平移就能解释的候选(规则纹理快速平移时格子统计量随相位起伏),不是单帧闪现;scanFile 另给 fromTime/toTime

avVideoFlickerObject.rows #

格子行数

avVideoFlickerObject.top #

按分数排序的最高 16 个候选(含阈值以下,用于标定);归为运动的带 motion 字段(像素/帧)

Markdown 格式