我已经测试了高斯混合(MOG)的两种不同实现,用于背景减法。一种是使用opncv2.1.0,cvCreateGaussianBGModel + cvUpdateBGStatModel,另一种是使用opencv 2.4.3,BackgroundSubtractorMOG2类。
Now, 2.4.3 provide a parameter called bShadowDetect, to identify the shadow area by gray color. But my experience with this implementation is, it does not provide the accuracy of shadow detection. It varies according to the parameter fTau. The other issue with this implementation is performance hit. For 640 X 480 resolution video, it is generating below 5 fps, By switching to release mode of project I get improvement upto 7 to 8 FPS.
The another implementation of MOG is using 2.1.0. I have configured GaussianBG state Model 's paramenters and then I am calling cvUpdateBGStatModel each time I receive a new frame.
For performance improvement, I have converted my frames to gray frames before I send it for state update. My best performance till now is using opencv 2.1.0 and which is around 30 FPS for 640 X 480 resolution frames. So, currently I am preferring opencv 2.1.0 version's MOG for background subtraction. But Here I come to face the issue of shadow removal. Here, I want to detect only moving object. that is without shadow, and draw a rectangle to highlight.
Any help in this context will be grateful.
提前致谢。
最佳答案
我在我的项目中实现的用于背景扣除的代码是我自己的。我没有使用这些内置函数,因为其中许多功能都很慢。
我所做的是:-
关于opencv - 如何使用opencv 2.1.0版本从前景中去除阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13799225/