private void DWTTest_Resize(object sender, EventArgs e) { if (FilePlot != null) { pictureBox1.Image = new Bitmap(pictureBox1.Width, pictureBox1.Height); pictureBox2.Image = new Bitmap(pictureBox2.Width, pictureBox2.Height); pictureBox3.Image = new Bitmap(pictureBox3.Width, pictureBox3.Height); FilePlot.Resize(pictureBox1.DisplayRectangle); FilePlot.Restore(Graphics.FromImage(pictureBox1.Image)); FPlot.Resize(pictureBox2.DisplayRectangle); FPlot.Restore(Graphics.FromImage(pictureBox2.Image)); TmpPlot.Resize(pictureBox3.DisplayRectangle); TmpPlot.Restore(Graphics.FromImage(pictureBox3.Image)); FilePlot.DrawData(); FPlot.DrawData(); TmpPlot.DrawData(); } }
private void ProcessData(int WindowSize) { ArrayList Mf = new ArrayList(); for (int left = 0; left + WindowSize < Data.Count; left += WindowSize / 2) { double[] temp = new double[WindowSize]; temp = (double[])Data.GetRange(left, WindowSize).ToArray(typeof(double)); RawTransform.Transform(ref temp); FPlot.AddData(temp); temp = RawTransform.getMFCC(temp); Mf.AddRange(temp); } if ((dataLength == 0) | (Mf.Count < dataLength)) { dataLength = Mf.Count; TmpPlot.SelectView(0, dataLength); } DataBase.Add(Mf); TmpPlot.AddData(Mf); FPlot.DrawData(); TmpPlot.DrawData(); }