private void modeChange() { if (imageProcess == null) { return; } if (imageMode) { if (mode == 1) { List <string> list = new List <string>(); list = imageProcess.Lsbspy(); TextBoxR.Text = list[0]; TextBoxG.Text = list[1]; TextBoxB.Text = list[2]; } else { TextBoxR.Text = ""; TextBoxG.Text = ""; TextBoxB.Text = ""; } if (mode == 2) { VectorOfMat vector = new VectorOfMat(); vector = imageProcess.Dftspy(); ImageRProcessed.ImageSource = BitmapHelper.BitmapToBitmapSource(vector[0].ToBitmap()); ImageGProcessed.ImageSource = BitmapHelper.BitmapToBitmapSource(vector[1].ToBitmap()); ImageBProcessed.ImageSource = BitmapHelper.BitmapToBitmapSource(vector[2].ToBitmap()); } if (mode == 3) { VectorOfMat vector = new VectorOfMat(); vector = imageProcess.Dctspy(); ImageRProcessed.ImageSource = BitmapHelper.BitmapToBitmapSource(vector[0].ToBitmap()); ImageGProcessed.ImageSource = BitmapHelper.BitmapToBitmapSource(vector[1].ToBitmap()); ImageBProcessed.ImageSource = BitmapHelper.BitmapToBitmapSource(vector[2].ToBitmap()); } } else { if (mode == 1) { List <string> list = imageProcess.Lsbspy(); TextBoxG.Text = list.First(); } else { TextBoxG.Text = ""; } if (mode == 2) { VectorOfMat vector = new VectorOfMat(); vector = imageProcess.Dftspy(); ImageGProcessed.ImageSource = BitmapHelper.BitmapToBitmapSource(vector[0].ToBitmap()); } if (mode == 3) { VectorOfMat vector = new VectorOfMat(); vector = imageProcess.Dctspy(); ImageGProcessed.ImageSource = BitmapHelper.BitmapToBitmapSource(vector[0].ToBitmap()); } } }