private void button1_Click(object sender, EventArgs e) { Image.Filters.Thinning ft = new Thinning(); //this.imgEdgeDetected = ft.Invert(this.imgEdgeDetected); //this.imgEdgeDetected = ft.ApplyFilter(this.imgEdgeDetected); // this.pictureBoxMain.Image = this.imgEdgeDetected; }
private void openFingerprintToMatchToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "JPG|*.jpg|PNG|*.png"; openFileDialog.ShowDialog(); string path = openFileDialog.FileName; if (path != null) { newBitmap = (Bitmap)Bitmap.FromFile(path); newBitmap = Thinning.Thin(newBitmap); MinutiaeFinder finder = new MinutiaeFinder(); Bitmap bitmap = finder.ShowMinutiae(newBitmap); pictureBoxNew.Image = bitmap; } }
private void CreateDB() { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "JPG|*.jpg|PNG|*.png"; openFileDialog.Multiselect = true; openFileDialog.ShowDialog(); List <UserFingerprint> userFingerprints = new List <UserFingerprint>(); foreach (String file in openFileDialog.FileNames) { Bitmap bitmap = (Bitmap)Bitmap.FromFile(file); bitmap = Thinning.Thin(bitmap); List <Minutiae> minutiaes = GetMinutiaesFromBitmap(bitmap); userFingerprints.Add(new UserFingerprint(file, minutiaes)); } Fingerprints fingerprints = new Fingerprints(userFingerprints); DbJSONSerializer db = new DbJSONSerializer(); db.WriteToFile(db.SerializeMinutiaes(fingerprints), "db_fingerprints.json"); }