首页 > 代码库 > 嵌入式开发之davinci--- 8148/8168/8127 中的添加算饭scd 场景检测

嵌入式开发之davinci--- 8148/8168/8127 中的添加算饭scd 场景检测

Osd

Scd

(1)     Introduction

  1. over view

a)         scene change detection

  1. block diagram

a)         graph

 

 

b)         resvolution

d1:720x576(pal)-25fps 720x480 30-fps(ntsc)--------------704x576 ti

cif:352x288 (支持的处理帧)

quwu:1024x768/4

c)         说明:

 

The block diagram above illustrates the  basic flow of the algorithm.  It is helpful to regard the SCD algorithm as an  “engine”  that consumes input  video  frames and produces  metadata.  Input video frames  fed  to  SCD  are  first  partitioned  into  blocks.  Valid  YUV  input  frames  provided  by  the framework are generally CIF resolution or smaller, but block widths are always fixed to be 32-pixels

wide.  The  xth horizontal  and  yth vertical  block  in  the  partition  matrix  at  time  t,  i.e.  b(x,y,t),  is compared against the co-located block from a prior frame  b(x,y,t-1) if motion detection for that block is  enabled.  If  frame-level  change,  e.g.  tamper  detection,  is  enabled,  then   b(x,y,t)  is  com pared

against  a  learned  model  of  the  scene  m(x,y,t-1).  The  actual  operations  to  generate  block-level metadata are more complex than a simple “subtraction,” as depicted in the block diagram.

These  metadata  are  evaluated  by  logical  rules  at  both  a  block-  and  frame-level,  depending  on whether motion monitoring and/or tamper monitoring is in effect, respectively. Rules for interpreting the  metadata  are  housed  inside  the  algorithm ;  however,  rules  and  how  they  influence  decisions can be manipulated by channel-specific parameters selected by the application.

 

(2)     Application programming interface for scene change detection

a)         Alglink_scdmod

typedef enum

{

ALG_LINK_SCD_DETECTMODE_DISABLE  = 0,

ALG_LINK_SCD_DETECTMODE_MONITOR_FULL_FRAME  = 1,

ALG_LINK_SCD_DETECTMODE_MONITOR_BLOCKS    = 2,

ALG_LINK_SCD_DETECTMODE_MONITOR_BLOCKS_AND_FRAME  = 3

} AlgLink_ScdMode;

ALG_LINK_SCD_DETECTMODE_DISABLE ptz

b)         Alglink_scdsensitivity

typedef enum {

ALG_LINK_SCD_SENSITIVITY_VERYLOW   = 0,

ALG_LINK_SCD_SENSITIVITY_LOW   = 1,

ALG_LINK_SCD_SENSITIVITY_MIDLO   = 2,

ALG_LINK_SCD_SENSITIVITY_MID   = 3,

ALG_LINK_SCD_SENSITIVITY_MIDHI   = 4,

ALG_LINK_SCD_SENSITIVITY_HIGH   = 5,

ALG_LINK_SCD_SENSITIVITY_VERYHIGH  = 6

} AlgLink_ScdSensitivity;

ALG_LINK_SCD_SENSITIVITY_VERYHIGH

c)         Alglink_scdoutput

typedef enum

{

ALG_LINK_SCD_DETECTOR_UNAVAILABLE =-1,

ALG_LINK_SCD_DETECTOR_NO_CHANGE  = 0,

ALG_LINK_SCD_DETECTOR_CHANGE = 1

} AlgLink_ScdOutput;

SCD_TI_process

 

d)         Scd struct

e)         Scd function call

 

 

 

 

 

 

 

 

General guidelines for video and scene characterstics

         SCD  is designed to  analyze  video  that  is  acquired  from  a  fixed  camera,  i.e.  the  field  of  view  does  not  change  due  to panning,  tilting,  or  zooming.   Video  is  processed  frame-by-frame.  The  order  and  timing  of  frames  are

crucial for analysis.  SCD  algorithms expect frames to be  available  in sequential order  with  inter-frame jitter  (variability  in  frame  timing)  minimized  to  be  no  greater  than  ±100  ms  outside  of  the  specified processing rate.

SCD  relies on a  fairly  stable field of view to identify relevant changes caused by moving objects.  Tamper events  are  assumed  to  affect  the  majority  of  the  field  of  view,  depending  on  the  sensitivity  setting.  To

prevent false alarms  and achieve desired results,  installers should be careful to position the camera to satisfy the following constraints:

?  The video should be in focus and as sharp as possible.

?  Camera mounting should be fixed and stable. Excessive vibration or movement from wind,  large vehicles, or other external factors should be avoided.

Scene Change Detection API & User’s Guide: Beta 00.50  – January 2012

TI Confidential – NDA Restrictions

?  Good  contrast  with  strong  edges  and  corners  is  desirable  for  optimum  performance.  Large reflective  surfaces,  glare  and  direct  illumination  (camera  pointed  at  the  sun)  can  result  in  poor contrast  and  must  be  avoided.  Tamper  detection  in  scenes  without  enough  visual  texture  or contrast, e.g. camera pointed at a blank wall, could be ineffective. However, motion detection has

no similar requirement, except for sufficient illumination.

?  No more than 75% of the scene should experience motion or change in appearance  at any given time.  The size  of  any individual moving object should not fill more than 50% of the camera’s field of view at any time. If these recommendations are unavoidable and the field of view is easily filled by objects moving into the scene temporarily, e.g. the scene of a camera monitoring traffic  is filled by vehicles in traffic, consider lowering the sensitivity to prevent false detections.

?  Areas monitored by the camera should be reasonably well lit, e.g. adequate for supporting human eyesight.  SCD  can  work  with  infrared  illuminators  to  assist  in  very  low-light  environments  or conditions, but operation under these circumstances can produce undesired effects. Precipitation, e.g. rain drops, snow flakes, ice, sleet,  etc., dirt, insects, or other debris  on the camera lens can cause SCD algorithms to work improperly.

 

Adjustments to sensitivity  settings  will  influence  detection  performance.  Lower sensitivity will require a larger  degree of high-contrast change for a  tamper  event to be generated and will result in fewer false events. Higher sensitivity will require a smaller amount of change for an event to be generated and could therefore result in more events, some of them false alarms.

 http://blog.csdn.net/mianhuantang848989/article/details/38035731

嵌入式开发之davinci--- 8148/8168/8127 中的添加算饭scd 场景检测