MD_PRESET_CONFIG

 

Description

Set the motion configuration to the specific motion region in MD_PRESET streaming mode (only available in fisheye camera).
This URL is only available in the PlatformK fisheye camera.

In MD_PRESET streaming mode, there are two video streams in wall mount and three video streams in ceiling mount. The stream 1 is the video stream with 1280x720 video resolution and the view is set by the specific PTZ preset point.
The stream 2 and 3 are the 180o full view video image streams. These two video streams have 6 motion regions (3 motion regions per stream). When the motion occurs, the camera moves the associated PTZ preset point to the stream 1.
Every motion detection window has its own priority and motion timer. The higher priority number has higher priority. These two parameters determine how the firmware move to associated PTZ preset point when motion occurs. Firmware will move to the PTZ preset point associated to the higher priority motion event.

The motion timer decides the active time interval of the motion trigger. The firmware checks the motion activity with motion priority to go the specific PTZ preset point.
The following figure illustrates how the MD_PRESET works.

In general, at least one motion detection region should be enabled in MD_PRESET mode. And, the PTZ preset points have to be set before configure the motion settings. If there is no motion region is enabled, the view of stream 1 will be the home position.
When the camera enters the MD_PRESET mode, the view of stream 1 follows the motion detection result. If there is no motion occurs when enters the MD_PRESET mode, the view of stream 1 will be the home position.

The CHANNEL=2 is used for accessing the motion configurations in stream 2. And CHANNEL=3 is used for accessing the motion configurations in stream 3. The motion detection function in MD_PRESET mode is independent of the setting MOTION_ENABLED. That means the motion triggered in the MD_PRESET mode even the MOTION_ENABLED=0x01.

Input Argument

n,state,sx,sy,ex,ey,sen,time,thd,priority,preset
where
n is the motion region started from 1 to 3
state is the state of this motion region. If it is 1, this motion is enabled. If it is 0, this motion region is disabled.
(sx,sy) is the coordinate in pixel of the left-top corner of the motion region.
(ex,ey) is the coordinate in pixel of the right-button corner of the motion region
sen is the sensitivity of the motion region and the range is 0~100. When the sen is 0, no motion occurs.
time is the motion timer in unit of second and the range is 0~300.
thd is the the percentage of motion triggered microblocks in the motion region and the range is 0~100
priority is the priority of motion region and the range is 1~3 in wall mount and 1~6 in ceiling mount
preset: PTZ preset point index and the range is 1~64. 1: for PTZ preset point 1.

The motion timer means the time interval started from a motion trigger (in control session) does not have motion trigger again. In other words, the remote host will not receive two successive motion triggers in control session during the motion time interval. Note that the motion trigger video B2 frame in video stream 2 and 3 will not be affected by this timer.

The motion region starts at the (0,0). The motion region was checked by following formula.
if( (ex<ImageWidth) && (ey<ImageHeight) && (ex >= (sx+16)) && (ey >= (ey+16)) ) then motion region is correct.

The motion region was divided into several microblocks (16x16 pixels in a motion block). Every microblock has it own calculation of motion detection. This URL gives an threshold of the number of motion triggered microblocks in the motion region. For example, there are 200 microblocks in a motion region and the threshold of the percentage of motion trigger microblocks is set to 10. The motion detection will be triggered when the number of motion triggered microblocks is higher than 20 in this region.

The priority is not allowed to be the same in motion regions. The higher value in priority has higher priority. When the change of priority on the specific motion region, the firmware will re-arrange priorities in other motion regions to maintain the correct motion priority sequence. For example,
assume the priority of motion region 1, 2, 3 are 2, 1, 3. When we change motion region 3 priority to 1, the priorities in motion region 1 and 3 are 3 and 2.

Attribute

Return of Message

MD_PRESET_CONFIG='1,0,0,0,319,79,70,1,10,1,1'
MD_PRESET_CONFIG='2,0,320,80,639,175,70,1,10,2,2'
MD_PRESET_CONFIG='3,0,640,176,959,255,70,1,10,3,3'

OK: MD_PRESET_CONFIG='1,1,0,0,319,79,70,1,10,3,5'
or
ERROR: invalid parameters

Applicability

Status

Valid

See Also

VIDEO_STREAM,

Example

http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&CHANNEL=n&MD_PRESET_CONFIG
or
http://ip:port/cgi-bin/cmd/encoder?CHANNEL=n&MD_PRESET_CONFIG
where n could be 2 or 3.

http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&CHANNEL=n&MD_PRESET_CONFIG=1,1,0,0,319,79,70,1,10,3,5
or
http://ip:port/cgi-bin/cmd/encoder?CHANNEL=n&MD_PRESET_CONFIG=1,1,0,0,319,79,70,1,10,3,5
where n could be 2 or 3.

Back to

HOME, ENCODER CGI