Name
run_bg_estirun_bg_estiRunBgEstirun_bg_estiRunBgEstiRunBgEsti — Schätzt den Hintergrund und liefert Vordergrund-Region.
run_bg_estirun_bg_estiRunBgEstirun_bg_estiRunBgEstiRunBgEsti adaptiert mit einem Kalman-Filter das im angegebenen
Datensatz liegende Hintergrundbild und liefert eine Region des Vordergrundes
(Bereich bewegter Objekte) zurück.
Es wird für jedes Pixel anhand der Daten im aktuellen Datensatz eine
Vorhersage des Grauwertes bestimmt und diese dann mit dem Wert im aktuellen
Bild (PresentImagePresentImagePresentImagePresentImagePresentImagepresentImage) verglichen. Mit dem Schwellenwert (fest oder
adaptiv, siehe create_bg_esticreate_bg_estiCreateBgEsticreate_bg_estiCreateBgEstiCreateBgEsti) werden die Pixel in
Vordergrund oder Hintergrund klassifiziert.
Es werden nur einkanalige Bilder verarbeitet, daher muss der Hintergrund
für jeden Kanal einzeln adaptiert werden. Hierzu müssen mehrere Datensätze
mit create_bg_esticreate_bg_estiCreateBgEsticreate_bg_estiCreateBgEstiCreateBgEsti aufgebaut werden.
Empfehlenswert ist es, den Hintergrundschätzer nur auf der Hälfte oder sogar nur
auf einem Viertel der Originalbildgröße anzuwenden. Hierzu muss das Originalbild
zunächst mit zoom_image_factorzoom_image_factorZoomImageFactorzoom_image_factorZoomImageFactorZoomImageFactor verkleinert werden (dies gilt auch für das
Initialisierungsbild bei create_bg_esticreate_bg_estiCreateBgEsticreate_bg_estiCreateBgEstiCreateBgEsti). Der Vorteil ist auf der
einen Seite die reduzierte Laufzeit und auf der anderen Seite ist das Bild durch
die Verkleinerung Tiefpass-gefiltert. Dadurch sind hochfrequente Störungen, wie
Kamerarauschen herausgefiltert und stören somit auch nicht bei der Adaption des
Hintergrundbildes. Es ist somit möglich die Schwelle (siehe
create_bg_esticreate_bg_estiCreateBgEsticreate_bg_estiCreateBgEstiCreateBgEsti) geringer zu wählen. Die von run_bg_estirun_bg_estiRunBgEstirun_bg_estiRunBgEstiRunBgEsti
zurückgelieferte ForegroundRegionForegroundRegionForegroundRegionForegroundRegionForegroundRegionforegroundRegion muss dann natürlich für die
Auswertung (Bereiche mit Bewegung) mit zoom_regionzoom_regionZoomRegionzoom_regionZoomRegionZoomRegion wieder um den
gleichen Faktor vergrößert werden.
Das übergebene Bild (PresentImagePresentImagePresentImagePresentImagePresentImagepresentImage) muss von gleichem Typ und
gleicher Größe sein, wie das im aktuellen Datensatz abgelegte
Hintergrundbild (festgelegt mit create_bg_esticreate_bg_estiCreateBgEsticreate_bg_estiCreateBgEstiCreateBgEsti).
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Wird ohne Parallelisierung verarbeitet.
Region der als Vordergrund detektierten Bereiche.
ID des BgEsti-Datensatzes.
* Read image for initialization:
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.0,10,3.25,15.0,BgEstiHandle)
* Read the next image in sequence:
read_image(Image1,'Image_1')
* Estimate the background:
run_bg_esti(Image1,ForegroundRegion1,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion1)
* Read the next image in sequence:
read_image(Image2,'Image_2')
* Estimate the background:
run_bg_esti(Image2,ForegroundRegion2,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion2)
* etc.
/* Read image for initialization: */
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,&BgEstiHandle) ;
/* Read the next image in sequence: */
read_image(&Image1,"Image_1") ;
/* Estimate the Background: */
run_bg_esti(Image1,&Region1,BgEstiHandle) ;
/* Display the foreground region: */
disp_region(Region1,WindowHandle) ;
/* Read the next image in sequence: */
read_image(&Image2,"Image_2") ;
/* Estimate the Background: */
run_bg_esti(Image2,&Region2,BgEstiHandle) ;
/* Display the foreground region: */
disp_region(Region2,WindowHandle) ;
/* etc. */
* Read image for initialization:
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.0,10,3.25,15.0,BgEstiHandle)
* Read the next image in sequence:
read_image(Image1,'Image_1')
* Estimate the background:
run_bg_esti(Image1,ForegroundRegion1,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion1)
* Read the next image in sequence:
read_image(Image2,'Image_2')
* Estimate the background:
run_bg_esti(Image2,ForegroundRegion2,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion2)
* etc.
* Read image for initialization:
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.0,10,3.25,15.0,BgEstiHandle)
* Read the next image in sequence:
read_image(Image1,'Image_1')
* Estimate the background:
run_bg_esti(Image1,ForegroundRegion1,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion1)
* Read the next image in sequence:
read_image(Image2,'Image_2')
* Estimate the background:
run_bg_esti(Image2,ForegroundRegion2,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion2)
* etc.
* Read image for initialization:
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.0,10,3.25,15.0,BgEstiHandle)
* Read the next image in sequence:
read_image(Image1,'Image_1')
* Estimate the background:
run_bg_esti(Image1,ForegroundRegion1,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion1)
* Read the next image in sequence:
read_image(Image2,'Image_2')
* Estimate the background:
run_bg_esti(Image2,ForegroundRegion2,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion2)
* etc.
* Read image for initialization:
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.0,10,3.25,15.0,BgEstiHandle)
* Read the next image in sequence:
read_image(Image1,'Image_1')
* Estimate the background:
run_bg_esti(Image1,ForegroundRegion1,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion1)
* Read the next image in sequence:
read_image(Image2,'Image_2')
* Estimate the background:
run_bg_esti(Image2,ForegroundRegion2,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion2)
* etc.
run_bg_estirun_bg_estiRunBgEstirun_bg_estiRunBgEstiRunBgEsti liefert den Wert 2 (H_MSG_TRUE), falls die Parameter
korrekt sind.
create_bg_esticreate_bg_estiCreateBgEsticreate_bg_estiCreateBgEstiCreateBgEsti,
update_bg_estiupdate_bg_estiUpdateBgEstiupdate_bg_estiUpdateBgEstiUpdateBgEsti
give_bg_estigive_bg_estiGiveBgEstigive_bg_estiGiveBgEstiGiveBgEsti,
update_bg_estiupdate_bg_estiUpdateBgEstiupdate_bg_estiUpdateBgEstiUpdateBgEsti
set_bg_esti_paramsset_bg_esti_paramsSetBgEstiParamsset_bg_esti_paramsSetBgEstiParamsSetBgEstiParams,
create_bg_esticreate_bg_estiCreateBgEsticreate_bg_estiCreateBgEstiCreateBgEsti,
update_bg_estiupdate_bg_estiUpdateBgEstiupdate_bg_estiUpdateBgEstiUpdateBgEsti,
give_bg_estigive_bg_estiGiveBgEstigive_bg_estiGiveBgEstiGiveBgEsti
Foundation