public static ImageData Filter(string fileName, SpatialFilterKernel kernel) { try { var src = new Mat(fileName); var bmp = kernel.FilterWriteableBitmap(src); var images = new ImageData(); images.SourceImage = src.ToWriteableBitmap(); images.ResultImage = bmp; return images; } finally { } }
public ImageWindowViewModel(ImageData data) { Images = data; SourceFileName = "source.png"; ResultFileName = "result.png"; }