/// <summary> /// Updates the background model /// </summary> /// <param name="frame">Next video frame.</param> /// <param name="learningRate">The learning rate, use -1.0f for default value.</param> public void Apply(IInputArray frame, IOutputArray forgroundMask, double learningRate = -1.0) { using (InputArray iaFrame = frame.GetInputArray()) using (OutputArray oaForgroundMask = forgroundMask.GetOutputArray()) CudaInvoke.cudaBackgroundSubtractorFGDApply(_ptr, iaFrame, oaForgroundMask, learningRate); }