private void videoPlayer_Opening(VideoPlayer sender, OpeningEventArgs args) { if (bgFrame != null) { bgFrame.Dispose(); } // create accumulator image when a new video is opened. bgAccum = new double[args.NewCapture.Height, args.NewCapture.Width]; for (int row = 0; row < args.NewCapture.Height; ++row) { for (int col = 0; col < args.NewCapture.Width; ++col) { bgAccum[row, col] = -1.0; } } bgFrame = args.NewCapture.CreateCompatibleImage(); }
public void Dispose() { FImage.Dispose(); FOutput.Dispose(); }
void IDisposable.Dispose() { FGrayscale.Dispose(); FLowResolution.Dispose(); }