private void ClickThresholdingButton(object sender, EventArgs e) { ImageProcessFunctions functions = new ImageProcessFunctions(); int thresholdValue = _thresholdScaleTrackBar.Value; _videoModel.SetProcessMethod(ImageProcessFunctions.Methods.Thresholding, thresholdValue); _videoModel.Play(); }
private void ClickHighBoostFilteringButton(object sender, EventArgs e) { ImageProcessFunctions functions = new ImageProcessFunctions(); float allFactor = (float)_allPassFactorNumericUpDown.Value; ImageProcessFunctions.MaskType type = _presentationModel.CheckedType; _videoModel.SetProcessMethod(ImageProcessFunctions.Methods.HighBoost, floatArgument: allFactor, maskType: type); _videoModel.Play(); }
private void ClickMosaicButton(object sender, EventArgs e) { ImageProcessFunctions functions = new ImageProcessFunctions(); int matrixWidth = (int)_matrixWidthNumericUpDown.Value; int matrixHeight = (int)_matrixHeightNumericUpDown.Value; _videoModel.SetProcessMethod(ImageProcessFunctions.Methods.Mosaic, matrixWidth, matrixHeight); _videoModel.Play(); }
private Image<Bgr, byte> SelectProcessMethodAndCompute() { Image<Bgr, Byte> result = null; ImageProcessFunctions functions = new ImageProcessFunctions(); Image<Bgr,byte> sourceImage = new Image<Bgr,byte>(_currentFrame.Bitmap); switch (_processMethod) { case ImageProcessFunctions.Methods.Averaging: result = functions.GetAveraging(sourceImage, _intArgument1, _intArgument2); break; case ImageProcessFunctions.Methods.Canny: result = functions.GetCanny(sourceImage, _intArgument1, _intArgument2); break; case ImageProcessFunctions.Methods.GrayScale: result = functions.GetGrayScale(sourceImage); break; case ImageProcessFunctions.Methods.HighBoost: result = functions.GetHighBoostFilteredImage(sourceImage, _floatArgument, _maskArgument); break; case ImageProcessFunctions.Methods.Inverse: result = functions.GetInverse(sourceImage); break; case ImageProcessFunctions.Methods.Laplacian: result = functions.GetLaplacian(sourceImage, _intArgument1); break; case ImageProcessFunctions.Methods.Mosaic: result = functions.GetMosaic(sourceImage, _intArgument1, _intArgument2); break; case ImageProcessFunctions.Methods.Sobel: result = functions.GetSobel(sourceImage, _intArgument1); break; case ImageProcessFunctions.Methods.Thresholding: result = functions.GetThresholding(sourceImage, _intArgument1); break; } return result; }
public void SetProcessMethod(ImageProcessFunctions.Methods method,int intArgument1 = 0, int intArgument2 = 0, float floatArgument = 0.0f, ImageProcessFunctions.MaskType maskType = ImageProcessFunctions.MaskType.Type1) { _processMethod = method; _intArgument1 = intArgument1; _intArgument2 = intArgument2; _floatArgument = floatArgument; _maskArgument = maskType; }
private void ClickInverseButton(object sender, EventArgs e) { ImageProcessFunctions functions = new ImageProcessFunctions(); _videoModel.SetProcessMethod(ImageProcessFunctions.Methods.Inverse); _videoModel.Play(); }