Change the estimated background image
update_bg_esti overwrites the image stored in the current BgEsti data set with the greyvalues of PresentImage within the bounds of UpDateRegion. This can be used for a "hard" adaptation: Image regions with a sudden change in (known) background can be adapted very fast this way.
Before calling update_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).
PresentImage (input_object) |
image -> object : byte / real |
current image |
UpDateRegion (input_object) |
region -> object |
region describing areas to change |
/* 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::) > /* use the Region and the information of a knowledge base */ /* to calculate the UpDateRegion */ update_bg_esti(Image1,UpdateRegion:::) > /* then read the next image in sequence: */ read_image(:Image2:'Image_2':) > /* estimate the Background: */ run_bg_esti(Image2:Region2::) > /* etc. */
update_bg_esti returns TRUE if all parameters are correct.