update_bg_estiT_update_bg_estiUpdateBgEstiUpdateBgEstiupdate_bg_esti (算子)

名称

update_bg_estiT_update_bg_estiUpdateBgEstiUpdateBgEstiupdate_bg_esti — 更改估计的背景图像。

签名

update_bg_esti(PresentImage, UpDateRegion : : BgEstiHandle : )

Herror T_update_bg_esti(const Hobject PresentImage, const Hobject UpDateRegion, const Htuple BgEstiHandle)

void UpdateBgEsti(const HObject& PresentImage, const HObject& UpDateRegion, const HTuple& BgEstiHandle)

void HImage::UpdateBgEsti(const HRegion& UpDateRegion, const HBgEsti& BgEstiHandle) const

void HBgEsti::UpdateBgEsti(const HImage& PresentImage, const HRegion& UpDateRegion) const

static void HOperatorSet.UpdateBgEsti(HObject presentImage, HObject upDateRegion, HTuple bgEstiHandle)

void HImage.UpdateBgEsti(HRegion upDateRegion, HBgEsti bgEstiHandle)

void HBgEsti.UpdateBgEsti(HImage presentImage, HRegion upDateRegion)

def update_bg_esti(present_image: HObject, up_date_region: HObject, bg_esti_handle: HHandle) -> None

描述

update_bg_estiupdate_bg_estiUpdateBgEstiUpdateBgEstiUpdateBgEstiupdate_bg_esti overwrites the image stored in the current BgEsti data set with the gray values of PresentImagePresentImagePresentImagePresentImagepresentImagepresent_image within the bounds of UpDateRegionUpDateRegionUpDateRegionUpDateRegionupDateRegionup_date_region. This can be used for a “hard” adaptation: Image regions with a sudden change in (known) background can be adapted very fast this way.

注意

The passed image (PresentImagePresentImagePresentImagePresentImagepresentImagepresent_image) must have the same type and size as the background image of the current data set (initialized with create_bg_esticreate_bg_estiCreateBgEstiCreateBgEstiCreateBgEsticreate_bg_esti).

执行信息

参数

PresentImagePresentImagePresentImagePresentImagepresentImagepresent_image (输入对象)  singlechannelimage objectHImageHObjectHImageHobject (byte / real)

Current image.

UpDateRegionUpDateRegionUpDateRegionUpDateRegionupDateRegionup_date_region (输入对象)  region objectHRegionHObjectHRegionHobject

Region describing areas to change.

BgEstiHandleBgEstiHandleBgEstiHandleBgEstiHandlebgEstiHandlebg_esti_handle (输入控制)  bg_estimation HBgEsti, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

ID of the BgEsti data set.

示例(HDevelop)

* read Init-Image:
read_image(InitImage,'xing/init')
* 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(Image0,'xing/xing000')
* estimate the Background:
run_bg_esti(Image0,Region1,BgEstiHandle)
* use the Region and the information of a knowledge base
* to calculate the UpDateRegion
update_bg_esti(Image0,UpdateRegion,BgEstiHandle)
* then read the next image in sequence:
read_image(Image1,'xing/xing001')
* estimate the Background:
run_bg_esti(Image1,Region2,BgEstiHandle)
* etc.

结果

update_bg_estiupdate_bg_estiUpdateBgEstiUpdateBgEstiUpdateBgEstiupdate_bg_esti 在所有参数正确时返回 2 ( H_MSG_TRUE )。

可能的前趋

run_bg_estirun_bg_estiRunBgEstiRunBgEstiRunBgEstirun_bg_esti

可能的后继

run_bg_estirun_bg_estiRunBgEstiRunBgEstiRunBgEstirun_bg_esti

另见

run_bg_estirun_bg_estiRunBgEstiRunBgEstiRunBgEstirun_bg_esti, give_bg_estigive_bg_estiGiveBgEstiGiveBgEstiGiveBgEstigive_bg_esti

模块

基础