ClassesClassesClassesClasses | | | | Operators

set_bg_esti_paramsset_bg_esti_paramsSetBgEstiParamsset_bg_esti_paramsSetBgEstiParamsSetBgEstiParams (Operator)

Name

set_bg_esti_paramsset_bg_esti_paramsSetBgEstiParamsset_bg_esti_paramsSetBgEstiParamsSetBgEstiParams — Change the parameters of the data set.

Signature

set_bg_esti_params( : : BgEstiHandle, Syspar1, Syspar2, GainMode, Gain1, Gain2, AdaptMode, MinDiff, StatNum, ConfidenceC, TimeC : )

Herror set_bg_esti_params(const Hlong BgEstiHandle, double Syspar1, double Syspar2, const char* GainMode, double Gain1, double Gain2, const char* AdaptMode, double MinDiff, const Hlong StatNum, double ConfidenceC, double TimeC)

Herror T_set_bg_esti_params(const Htuple BgEstiHandle, const Htuple Syspar1, const Htuple Syspar2, const Htuple GainMode, const Htuple Gain1, const Htuple Gain2, const Htuple AdaptMode, const Htuple MinDiff, const Htuple StatNum, const Htuple ConfidenceC, const Htuple TimeC)

Herror set_bg_esti_params(const HTuple& BgEstiHandle, const HTuple& Syspar1, const HTuple& Syspar2, const HTuple& GainMode, const HTuple& Gain1, const HTuple& Gain2, const HTuple& AdaptMode, const HTuple& MinDiff, const HTuple& StatNum, const HTuple& ConfidenceC, const HTuple& TimeC)

void HBgEsti::SetBgEstiParams(const HTuple& Syspar1, const HTuple& Syspar2, const HTuple& GainMode, const HTuple& Gain1, const HTuple& Gain2, const HTuple& AdaptMode, const HTuple& MinDiff, const HTuple& StatNum, const HTuple& ConfidenceC, const HTuple& TimeC) const

void SetBgEstiParams(const HTuple& BgEstiHandle, const HTuple& Syspar1, const HTuple& Syspar2, const HTuple& GainMode, const HTuple& Gain1, const HTuple& Gain2, const HTuple& AdaptMode, const HTuple& MinDiff, const HTuple& StatNum, const HTuple& ConfidenceC, const HTuple& TimeC)

void HBgEsti::SetBgEstiParams(double Syspar1, double Syspar2, const HString& GainMode, double Gain1, double Gain2, const HString& AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC) const

void HBgEsti::SetBgEstiParams(double Syspar1, double Syspar2, const char* GainMode, double Gain1, double Gain2, const char* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC) const

void HOperatorSetX.SetBgEstiParams(
[in] VARIANT BgEstiHandle, [in] VARIANT Syspar1, [in] VARIANT Syspar2, [in] VARIANT GainMode, [in] VARIANT Gain1, [in] VARIANT Gain2, [in] VARIANT AdaptMode, [in] VARIANT MinDiff, [in] VARIANT StatNum, [in] VARIANT ConfidenceC, [in] VARIANT TimeC)

void HBgEstiX.SetBgEstiParams(
[in] double Syspar1, [in] double Syspar2, [in] BSTR GainMode, [in] double Gain1, [in] double Gain2, [in] BSTR AdaptMode, [in] double MinDiff, [in] Hlong StatNum, [in] double ConfidenceC, [in] double TimeC)

static void HOperatorSet.SetBgEstiParams(HTuple bgEstiHandle, HTuple syspar1, HTuple syspar2, HTuple gainMode, HTuple gain1, HTuple gain2, HTuple adaptMode, HTuple minDiff, HTuple statNum, HTuple confidenceC, HTuple timeC)

void HBgEsti.SetBgEstiParams(double syspar1, double syspar2, string gainMode, double gain1, double gain2, string adaptMode, double minDiff, int statNum, double confidenceC, double timeC)

Description

set_bg_esti_paramsset_bg_esti_paramsSetBgEstiParamsset_bg_esti_paramsSetBgEstiParamsSetBgEstiParams is used to change the parameters of the data set. The parameters passed by set_bg_esti_paramsset_bg_esti_paramsSetBgEstiParamsset_bg_esti_paramsSetBgEstiParamsSetBgEstiParams are the same as in create_bg_esticreate_bg_estiCreateBgEsticreate_bg_estiCreateBgEstiCreateBgEsti (see there for an explanation).

The image format cannot be changed! To do this, a new data set with an initialization image of the appropriate format has to be created.

To exchange the background image completely, use update_bg_estiupdate_bg_estiUpdateBgEstiupdate_bg_estiUpdateBgEstiUpdateBgEsti. The current image then has to be passed for both the input image and the update region.

Attention

If GainModeGainModeGainModeGainModeGainModegainMode was set to 'frame'"frame""frame""frame""frame""frame", the run-time can be extremely long for large values of Gain1Gain1Gain1Gain1Gain1gain1 or Gain2Gain2Gain2Gain2Gain2gain2, because the values for the gains' table are determined by a simple binary search.

Parallelization

Parameters

BgEstiHandleBgEstiHandleBgEstiHandleBgEstiHandleBgEstiHandlebgEstiHandle (input_control)  bg_estimation HBgEsti, HTupleHTupleHBgEsti, HTupleHBgEstiX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

ID of the BgEsti data set.

Syspar1Syspar1Syspar1Syspar1Syspar1syspar1 (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

1. system matrix parameter.

Default value: 0.7

Suggested values: 0.65, 0.7, 0.75

Typical range of values: 0.05 ≤ Syspar1 Syspar1 Syspar1 Syspar1 Syspar1 syspar1 ≤ 1.0

Recommended increment: 0.05

Syspar2Syspar2Syspar2Syspar2Syspar2syspar2 (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

2. system matrix parameter.

Default value: 0.7

Suggested values: 0.65, 0.7, 0.75

Typical range of values: 0.05 ≤ Syspar2 Syspar2 Syspar2 Syspar2 Syspar2 syspar2 ≤ 1.0

Recommended increment: 0.05

GainModeGainModeGainModeGainModeGainModegainMode (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Gain type.

Default value: 'fixed' "fixed" "fixed" "fixed" "fixed" "fixed"

List of values: 'fixed'"fixed""fixed""fixed""fixed""fixed", 'frame'"frame""frame""frame""frame""frame"

Gain1Gain1Gain1Gain1Gain1gain1 (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Kalman gain / foreground adaptation time.

Default value: 0.002

Suggested values: 10.0, 20.0, 50.0, 0.1, 0.05, 0.01, 0.005, 0.001

Restriction: 0.0 <= Gain1

Gain2Gain2Gain2Gain2Gain2gain2 (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Kalman gain / background adaptation time.

Default value: 0.02

Suggested values: 2.0, 4.0, 8.0, 0.5, 0.1, 0.05, 0.01

Restriction: 0.0 <= Gain2

AdaptModeAdaptModeAdaptModeAdaptModeAdaptModeadaptMode (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Threshold adaptation.

Default value: 'on' "on" "on" "on" "on" "on"

List of values: 'off'"off""off""off""off""off", 'on'"on""on""on""on""on"

MinDiffMinDiffMinDiffMinDiffMinDiffminDiff (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Foreground/background threshold.

Default value: 7.0

Suggested values: 3.0, 5.0, 7.0, 9.0, 11.0

Recommended increment: 0.2

StatNumStatNumStatNumStatNumStatNumstatNum (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of statistic data sets.

Default value: 10

Suggested values: 5, 10, 20, 30

Typical range of values: 1 ≤ StatNum StatNum StatNum StatNum StatNum statNum

Recommended increment: 5

ConfidenceCConfidenceCConfidenceCConfidenceCConfidenceCconfidenceC (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Confidence constant.

Default value: 3.25

Suggested values: 4.30, 3.25, 2.82, 2.62

Recommended increment: 0.01

Restriction: 0.0 < ConfidenceC

TimeCTimeCTimeCTimeCTimeCtimeC (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Constant for decay time.

Default value: 15.0

Suggested values: 10.0, 15.0, 20.0

Recommended increment: 5.0

Restriction: 0.0 < TimeC

Example (HDevelop)

* Read image for initialization:
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.0,10,3.25,15.0,BgEstiHandle)
* Read the next image in sequence:
read_image(Image0,'xing/xing000')
* Estimate the background:
run_bg_esti(Image0,ForegroundRegion1,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion1)
* Read the next image in sequence:
read_image(Image1,'xing/xing001')
* Estimate the background:
run_bg_esti(Image1,ForegroundRegion2,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion2)
* etc.
* Change parameter in dataset:
set_bg_esti_params(BgEstiHandle,0.7,0.7,'fixed', \
                    0.004,0.08,'on',9.0,10,3.25,20.0)
* Read the next image in sequence:
read_image(Image2,'xing/xing002')
* Estimate the background:
run_bg_esti(Image2,ForegroundRegion3,BgEstiHandle)
* Display the foreground region:
dev_display(ForegroundRegion3)
* etc.

Example (C)

/* Read image for initialization:*/
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.0,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) ;
/* Display the foreground region: */
disp_region(Region1,WindowHandle) ;
/* Dead the next image in sequence: */
read_image(&Image1,"xing/xing001") ;
/* Estimate the background: */
run_bg_esti(Image1,&Region2,BgEstiHandle) ;
/* Display the foreground region: */
disp_region(Region2,WindowHandle) ;
/* etc. */
/* change parameter in dataset: */
set_bg_esti_params(BgEstiHandle,0.7,0.7,"fixed",
                   0.004,0.08,"on",9.0,10,3.25,20.0) ;
/* Read the next image in sequence: */
read_image(&Image3,"Image_3") ;
/* Estimate the background: */
run_bg_esti(Image3,&Region3,BgEstiHandle) ;
/* Display the foreground region: */
disp_region(Region3,WindowHandle) ;
/* etc. */

Example (HDevelop)

* Read image for initialization:
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.0,10,3.25,15.0,BgEstiHandle)
* Read the next image in sequence:
read_image(Image0,'xing/xing000')
* Estimate the background:
run_bg_esti(Image0,ForegroundRegion1,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion1)
* Read the next image in sequence:
read_image(Image1,'xing/xing001')
* Estimate the background:
run_bg_esti(Image1,ForegroundRegion2,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion2)
* etc.
* Change parameter in dataset:
set_bg_esti_params(BgEstiHandle,0.7,0.7,'fixed', \
                    0.004,0.08,'on',9.0,10,3.25,20.0)
* Read the next image in sequence:
read_image(Image2,'xing/xing002')
* Estimate the background:
run_bg_esti(Image2,ForegroundRegion3,BgEstiHandle)
* Display the foreground region:
dev_display(ForegroundRegion3)
* etc.

Example (HDevelop)

* Read image for initialization:
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.0,10,3.25,15.0,BgEstiHandle)
* Read the next image in sequence:
read_image(Image0,'xing/xing000')
* Estimate the background:
run_bg_esti(Image0,ForegroundRegion1,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion1)
* Read the next image in sequence:
read_image(Image1,'xing/xing001')
* Estimate the background:
run_bg_esti(Image1,ForegroundRegion2,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion2)
* etc.
* Change parameter in dataset:
set_bg_esti_params(BgEstiHandle,0.7,0.7,'fixed', \
                    0.004,0.08,'on',9.0,10,3.25,20.0)
* Read the next image in sequence:
read_image(Image2,'xing/xing002')
* Estimate the background:
run_bg_esti(Image2,ForegroundRegion3,BgEstiHandle)
* Display the foreground region:
dev_display(ForegroundRegion3)
* etc.

Example (HDevelop)

* Read image for initialization:
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.0,10,3.25,15.0,BgEstiHandle)
* Read the next image in sequence:
read_image(Image0,'xing/xing000')
* Estimate the background:
run_bg_esti(Image0,ForegroundRegion1,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion1)
* Read the next image in sequence:
read_image(Image1,'xing/xing001')
* Estimate the background:
run_bg_esti(Image1,ForegroundRegion2,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion2)
* etc.
* Change parameter in dataset:
set_bg_esti_params(BgEstiHandle,0.7,0.7,'fixed', \
                    0.004,0.08,'on',9.0,10,3.25,20.0)
* Read the next image in sequence:
read_image(Image2,'xing/xing002')
* Estimate the background:
run_bg_esti(Image2,ForegroundRegion3,BgEstiHandle)
* Display the foreground region:
dev_display(ForegroundRegion3)
* etc.

Example (HDevelop)

* Read image for initialization:
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.0,10,3.25,15.0,BgEstiHandle)
* Read the next image in sequence:
read_image(Image0,'xing/xing000')
* Estimate the background:
run_bg_esti(Image0,ForegroundRegion1,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion1)
* Read the next image in sequence:
read_image(Image1,'xing/xing001')
* Estimate the background:
run_bg_esti(Image1,ForegroundRegion2,BgEstiHandle)
* Display the foreground region:
dev_display (ForegroundRegion2)
* etc.
* Change parameter in dataset:
set_bg_esti_params(BgEstiHandle,0.7,0.7,'fixed', \
                    0.004,0.08,'on',9.0,10,3.25,20.0)
* Read the next image in sequence:
read_image(Image2,'xing/xing002')
* Estimate the background:
run_bg_esti(Image2,ForegroundRegion3,BgEstiHandle)
* Display the foreground region:
dev_display(ForegroundRegion3)
* etc.

Result

set_bg_esti_paramsset_bg_esti_paramsSetBgEstiParamsset_bg_esti_paramsSetBgEstiParamsSetBgEstiParams returns 2 (H_MSG_TRUE) if all parameters are correct.

Possible Predecessors

create_bg_esticreate_bg_estiCreateBgEsticreate_bg_estiCreateBgEstiCreateBgEsti

Possible Successors

run_bg_estirun_bg_estiRunBgEstirun_bg_estiRunBgEstiRunBgEsti

See also

update_bg_estiupdate_bg_estiUpdateBgEstiupdate_bg_estiUpdateBgEstiUpdateBgEsti

Module

Foundation


ClassesClassesClassesClasses | | | | Operators