private void Laplasjan(object sender, RoutedEventArgs e)
        {
            temporary = Filtrator.LaplasjanFilter((Bitmap)workingImage.Clone());
            ImageWindow iw = new ImageWindow(ImageSupporter.Bitmap2BitmapImage(temporary));

            iw.Show();
        }
        void Form1_DragDrop(object sender, DragEventArgs e)
        {
            String[] files = (String[])e.Data.GetData(DataFormats.FileDrop);
            // foreach (string file in files) Console.WriteLine(file);
            //this.TXT.Text = files[0];
            Bitmap bitmap = new Bitmap(files[0]);

            BitmapImage logo = new BitmapImage();

            logo.BeginInit();
            logo.UriSource = new Uri(files[0]);
            logo.EndInit(); // Getting the exception here
            originalImage.Source = logo;

            Bitmap tmp = ImageSupporter.ColorToGrayscale(ImageSupporter.BitmapImage2Bitmap(logo));
            Bitmap or  = Filtrator.segmentation(100, tmp);

            //originalImage.Source = ImageSupporter.Bitmap2BitmapImage(ImageSupporter.ColorToGrayscale(ImageSupporter.BitmapImage2Bitmap(logo)));
            originalImage.Source = ImageSupporter.Bitmap2BitmapImage(or);
            newImageSource       = files[0];


            fingerprint        = new Fingerprint((BitmapImage)originalImage.Source);
            this.orginalBitmap = fingerprint.orginalImage;
            this.workingImage  = (Bitmap)orginalBitmap.Clone();

            //actualFingerprint = new Fingerprint(logo);
            helpText.Visibility = Visibility.Hidden;
        }
        private void Gornoprzepustowy(object sender, RoutedEventArgs e)
        {
            temporary = Filtrator.HighPassFilter(EMask.Prewitt, (Bitmap)workingImage.Clone());
            ImageWindow iw = new ImageWindow(ImageSupporter.Bitmap2BitmapImage(temporary));

            iw.Show();
        }
        private void LowPassFilter(object sender, RoutedEventArgs e)
        {
            temporary = Filtrator.LowPassFilter(JMask.GAUSS, (Bitmap)workingImage.Clone());
            ImageWindow iw = new ImageWindow(ImageSupporter.Bitmap2BitmapImage(temporary));

            iw.Show();
        }
 private void Normalization()
 {
     try {
         temporary = Filtrator.Normalization(workingImage);
     }
     catch (Exception ex)
     {
     }
 }
        private void LoadImage(String path)
        {
            BitmapImage logo = new BitmapImage();

            logo.BeginInit();
            logo.UriSource = new Uri(path);
            logo.EndInit();
            //originalImage.Source = logo;

            Bitmap tmp = ImageSupporter.ColorToGrayscale(ImageSupporter.BitmapImage2Bitmap(logo));
            Bitmap or  = Filtrator.segmentation(100, tmp);

            //originalImage.Source = ImageSupporter.Bitmap2BitmapImage(ImageSupporter.ColorToGrayscale(ImageSupporter.BitmapImage2Bitmap(logo)));
            //originalImage.Source = ImageSupporter.Bitmap2BitmapImage(or);
            newImageSource = path;


            fingerprint        = new Fingerprint(ImageSupporter.Bitmap2BitmapImage(or));
            this.orginalBitmap = fingerprint.orginalImage;
            this.workingImage  = (Bitmap)orginalBitmap.Clone();
        }
Esempio n. 7
0
        private void MinutiaeVeryfication(List <Minutia> minutions, Bitmap bitmap)
        {
            List <Minutia> removeList = new List <Minutia>();

            int[,] segmentationImage = Filtrator.BackgroundSegmentation(bitmap);
            int w = 10;

            foreach (var item in minutions)
            {
                Boolean flag = true;

                for (int i = item.p.X - w / 2; i < item.p.X + w / 2; i++)
                {
                    for (int j = item.p.Y - w / 2; j < item.p.Y + w / 2; j++)
                    {
                        if (i < bitmap.Width && i > 0 && j < bitmap.Height && j > 0)
                        {
                            if (segmentationImage[i, j] == 0)
                            {
                                flag = false;
                            }
                        }
                    }
                }
                if (flag == false)
                {
                    removeList.Add(item);
                }
            }

            foreach (var item in removeList)
            {
                minutions.Remove(item);
            }

            removeList.Clear();
        }
 private void GridedHistogram()
 {
     temporary = Filtrator.HistorgramGridedFilter((Bitmap)workingImage.Clone(), 32);
 }
 private void Binaryzation()
 {
     temporary = Filtrator.Binaryzation((Bitmap)workingImage.Clone(), Int32.Parse(BinaryzationValue.Text));
 }
 private void Binaryzation(object sender, RoutedEventArgs e)
 {
     Binaryzation();
     temporary = Filtrator.Binaryzation((Bitmap)workingImage.Clone(), Int32.Parse(BinaryzationValue.Text));
     StartImageWindow(temporary);
 }
 private void Histogram()
 {
     temporary = Filtrator.Histogram((Bitmap)workingImage.Clone());
 }
 private void MedianFilter()
 {
     temporary = Filtrator.MedianFilter((Bitmap)workingImage.Clone());
 }
Esempio n. 13
0
 private static Bitmap areaFilter(Bitmap b)
 {
     return(Filtrator.HighPassFilter(EMask.Prewitt, b));
 }