What is the meaning of “history” inside BackgroundSubtractorMOG2?

后端 未结 1 639
梦如初夏
梦如初夏 2021-01-12 10:00

I\'m on OpenCV for java (but that\'s not relevant I guess). I\'m using the BackgroundSubtractorMOG2 class which is (poorly) referenced here. I have read and und

相关标签:
1条回答
  • 2021-01-12 10:17

    It seems clear that alpha = 1 / history (except for some transitory instants). In void BackgroundSubtractorMOG2Impl::apply method:

    learningRate = learningRate >= 0 && nframes > 1 ? learningRate : 1./std::min( 2*nframes, history );
    

    You can test if the BackgroundSubtractorMOG2 object is using the history value that you pass in the constructor using the getHistory() method.

    0 讨论(0)
提交回复
热议问题