public async Task IniciarAnalise(decimal tempo, decimal numCapturas, WebCam webCam, Rectangle retangulo) { Repetições = Convert.ToInt32(tempo * numCapturas); Intervalo = TimeSpan.FromMilliseconds(1000 / Convert.ToInt32(numCapturas)); for (int i = 0; i < Repetições; i++) { Capturas.Add(webCam.Matriz.ToImage <Bgr, byte>().GetSubRect(retangulo).GetAverage()); CalcularSinal(i); await Task.Delay(Intervalo); } }