Ask Your Question

alex's profile - activity

2015-03-23 05:30:38 -0600 received badge  Popular Question (source)
2012-10-24 01:53:23 -0600 received badge  Self-Learner (source)
2012-10-23 08:07:12 -0600 answered a question Access to MOG2 parameters via algorithm interface in 2.4.2 version
2012-10-23 08:06:31 -0600 answered a question How to change BackgroundSubtractorMOG2 options
2012-10-23 08:02:03 -0600 answered a question Cannot set user parameters in BackgroundSubtractorMOG2
2012-10-13 07:38:44 -0600 received badge  Editor (source)
2012-10-12 16:46:36 -0600 commented question Cannot set user parameters in BackgroundSubtractorMOG2

ok, so how can I set its value?

2012-10-12 13:27:59 -0600 commented question Access to MOG2 parameters via algorithm interface in 2.4.2 version

Did you figure it out? I opened a similar question, see http://answers.opencv.org/question/3108/cannot-set-user-parameters-in/

2012-10-12 13:26:35 -0600 received badge  Critic (source)
2012-10-12 13:26:33 -0600 received badge  Supporter (source)
2012-10-12 13:26:07 -0600 commented answer How to change BackgroundSubtractorMOG2 options

This does not answer the question. I have the same problem. Is this a bug? I opened a new question http://answers.opencv.org/question/3108/cannot-set-user-parameters-in/

2012-10-12 13:07:56 -0600 asked a question Cannot set user parameters in BackgroundSubtractorMOG2

OpenCV library version 2.42. I'd like to set a parameter in BackgroundSubtractorMOG2 object, e.g.

BackgroundSubtractorMOG2 bgr;

// the following doesn't work because 'nmixtures', 'backgroundRatio' 
// and 'fVarMin' are a protected members.
bgr.nmixtures = 3;   
bgr.backgroundRatio = 0.9;
bgr.fVarMin = 5;

// the following works 
bgr.set('nmixtures', 3); 

// However, the following lines will give a run-time error 
// `Access violation reading location 0x0000000000000008.`
bgr.set("backgroundRatio", 0.9);  
bgr.set("backgroundRatio", (float) 0.9);
bgr.set("fVarMin", 5);

backgroundRatio and fVarMin are parameters that control the algorithm. A user should be able to change these parameters after constructing the instance of BackgroundSubtractorMOG2 class as stated in the documentation.

How can I set the parameters of BackgroundSubtractorMOG2?

2012-07-21 09:26:26 -0600 answered a question OpenCV with Qt support namedWindow crash

I have exactly the same problem with the same OpenCV exception. I have OpenCV 2.4.1 built with QT support enabled. The program runs fine in release mode but crashes in Debug mode. It crashes at namedWindow( "Window name", 1);