run_bg_esti ( PresentImage : ForegroundRegion : : )

Estimate the background and return the foreground region

run_bg_esti adapts the background image stored in the current BgEsti data set using a kalman filter on each pixel and returns a region of the foreground (detected moving objects).

For every pixel an estimation of its greyvalue is computed using the values of the current data set and its stored background image and the current image (PresentImage). By comparson to the threshold (fixed or adaptive, see create_bg_esti) the pixels are classified as either foreground or background.

The background estimation processes only single-channel images. Therefore the background has to be adapted separately for every channel. To do so, data sets must be created for every channel with create_bg_esti and the current data set has to be set with set_bg_esti.

The background estimation should be used on half- or even quartes-sized images. For this, the input images (and the initialization image!) has to be reduced using zoom_image2. The advantage is a shorter run-time on one hand and a low-band filtering on the other. The filtering eliminates high frequency noise and results in a more reliable estimation. As a result the threshold (see create_bg_esti) can be lowered. The foreground region returned by run_bg_esti then has to be enlarged again for further processing.


Attention

Before calling run_bg_esti, a data set has to be marked as current set. The passed image (PresentImage) must be the same type and size as the background image of the current data set (initialized with create_bg_esti).


Parameters

PresentImage (input_object)
image -> object : byte / real
current image

ForegroundRegion (output_object)
region -> object
region of the detected foreground


Example
/* read Init-Image: */
read_image(:InitImage:'Init_Image':) >
/* initialize BgEsti-Dataset with fixed gains and threshold adaption */
create_bg_esti(InitImage::0.7,0.7,'fixed',0.002,0.02,'on',7,10,3.25,15.0:) >
/* read the next image in sequence: */
read_image(:Image1:'Image_1':) >
/* estimate the Background: */
run_bg_esti(Image1:Region1::) >
/* display the foreground region: */
disp_region(Region1) > 
/* read the next image in sequence: */
read_image(:Image2:'Image_2':) >
/* estimate the Background: */
run_bg_esti(Image2:Region2::) >
/* display the foreground region: */
disp_region(Region2) >
/* etc. */

Result

run_bg_esti returns TRUE if all parameters are correct.


Possible Predecessors

create_bg_esti, set_bg_esti, update_bg_esti


Possible Successors

run_bg_esti, give_bg_esti, update_bg_esti


See also

change_bg_esti_params, create_bg_esti, set_bg_esti, update_bg_esti, give_bg_esti



Copyright © 1996-1997 MVTec Software GmbH