Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have achieved to set fTau parameter by inheritance;

Declare a custom class

class BackgroundSubtractorMOG2Custom: public BackgroundSubtractorMOG2{ public: void setTau(float val){fTau = val;} };

Then;

BackgroundSubtractorMOG2Custom bgmodel; bgmodel.setTau(0);

I have achieved to set fTau parameter by inheritance;

Declare a custom class

class BackgroundSubtractorMOG2Custom: public BackgroundSubtractorMOG2{
public:
    void setTau(float val){fTau = val;}
};

};

Then;

BackgroundSubtractorMOG2Custom bgmodel;
bgmodel.setTau(0);

bgmodel.setTau(0);

I have achieved to set fTau parameter by inheritance;

Declare a custom class

class BackgroundSubtractorMOG2Custom: public BackgroundSubtractorMOG2{
public:
    void setTau(float val){fTau = val;}
};

Then;

BackgroundSubtractorMOG2Custom bgmodel;
bgmodel.setTau(0);
bgmodel.setTau(0.35);