コード例 #1
0
 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;
 }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
        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");
        }