<p>There is an alternative OpenCV based implementation of many recent shadow detection algorithms, providing much higher quality of shadow detection:</p>

<p><a href="http://arma.sourceforge.net/shadows/" rel="nofollow">http://arma.sourceforge.net/shadows/</a></p>

<p>There is also an associated <a href="http://arxiv.org/pdf/1304.1233.pdf" rel="nofollow">journal article</a>, describing all the implemented algorithms and their various trade-offs (eg. quality vs speed).</p>
how to remove shadow from the foreground using opencv 2.1.0 version
<p>I have been testing two different implementation of Mixture of Gaussians (MOG) for background subtraction. One is using opncv2.1.0, cvCreateGaussianBGModel + cvUpdateBGStatModel and another is using opencv 2.4.3, BackgroundSubtractorMOG2 class.</p>

<pre><code>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. 
</code></pre>

<p>Thanks in Advance. </p>