public void Reset( )
{
lock ( sync )
{
if ( backgroundFrame != null )
{
backgroundFrame.Dispose( );
backgroundFrame = null;
}
if ( motionFrame != null )
{
motionFrame.Dispose( );
motionFrame = null;
}
if ( tempFrame != null )
{
tempFrame.Dispose( );
tempFrame = null;
}
framesCounter = 0;
}
}
}