private void K3MBtn_Click(object sender, RoutedEventArgs e) { var algorithm = new K3M(this.picture.Bitmap); picture = algorithm.Apply(this.picture); OutputImage.Source = picture.BitmapSource; }
private void Thining(object sender, RoutedEventArgs e) { if (!K3M.IsImageBinarizated((BitmapSource)ModifiedImgSingleton.Source)) { MessageBox.Show("Obraz musi zostać zbinaryzowany!", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error); return; } ModifiedImgSingleton.Source = K3M.ThinningWithK3M((BitmapSource)ModifiedImgSingleton.Source); }