Motion detection – Sensoray 2251 Rev.A User Manual

Page 35

Advertising
background image

inSize

size of pFrame buffer supplied (use 768*576*3 if unsure)

pFrame

pointer to buffer of size inSize where frame is stored

type

0, uncompressed(colorspace determined beforehand with SN_SetPlayback), 1 compressed

pBMI

pointer to bitmap info. For compressed images, the length of data is stored as biSizeImage.

block

0 – non blocking, 1 blocking with timeout

timeout

blocking timeout in milliseconds

vidnum

assigned number of the playback stream

Returns

0 if success, negative if error.

Motion Detection

Motion Detection on the 2250/51 (and 314) involves regions of interest and motion thresholds.
The chip firmware has 3 user programmable regions of interest. The SDK shows 4 regions of
interest in the structure MID2250_MDConfig_t. The 4

th

region, corresponding to index 3(starts

from zero) is reserved for possible future use.

The regions are described in pixels. The user specifies an upper left co-ordinate and a lower right
pixel coordinate for each region.

There is a requirement that the regions do not overlap on a macro-block(MB) level. They should
be spaced 16 pixels apart as one macro-block corresponds to a 16x16 pixel block. The
MDSettingDlg.cpp file in the demo app demonstrates verification of the MD regions.

If a region is unused, the coordinates {0,0} should be used for both the upper left corner and
bottom right corner.

In each region, motion is detected on the basis of threshold values. The first threshold is the SAD
(sum of absolute differences), which represents changes in intensity. The recommended range for
the SAD is 20-150. In general SAD will catch fast motion across the target. For testing purposes,
start at SAD=40 (with sensitivity = 80).

35

Advertising
This manual is related to the following products: