Форум программистов, компьютерный форум, киберфорум
C# для начинающих
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.56/18: Рейтинг темы: голосов - 18, средняя оценка - 4.56
2 / 2 / 2
Регистрация: 24.04.2016
Сообщений: 191

Сравнение отпечатков пальцев

31.03.2017, 15:13. Показов 3931. Ответов 6

Студворк — интернет-сервис помощи студентам
Уважаемые разработчики, если вас не затруднит помогите пожалуйста разобраться с кодом
в интернете нашел пример как происходит сравнение отпечатков пальцев
Вот собственно сам пример:

Форма 1
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using FPRFramework.Core;
using FPRFramework.ResourceProviders
namespace FPRFramework.Applications
{
public partial class FVCExperimenterForm : Form
{
public FVCExperimenterForm()
{
InitializeComponent();
var providerByFeatType = new Dictionary<Type, List<Type>>();
var mtiaListExtractors = new List<Type>();
var orImgExtractors = new List<Type>();
var skImgExtractors = new List<Type>();
var experiments = new List<Type>();
 
Assembly thisAss = Assembly.GetExecutingAssembly();
string dir = Path.GetDirectoryName(thisAss.Location);
foreach (string fileName in Directory.GetFiles(dir))
if (Path.GetExtension(fileName) == ".dll")
try
{
Assembly currAssembly = Assembly.LoadFile(fileName);
foreach (Type type in currAssembly.GetExportedTypes())
if (type.IsClass && !type.IsAbstract)
{
var currInterface = type.GetInterface("IFeatureExtractor`1");
if (currInterface != null)
{
var featType = currInterface.GetGenericArguments()[0];
if (featType == typeof(List<Minutia>))
{
mtiaListExtractors.Add(type);
continue;
}
if (featType == typeof(OrientationImage))
{
orImgExtractors.Add(type);
continue;
}
if (featType == typeof(SkeletonImage))
{
skImgExtractors.Add(type);
continue;
}
}
currInterface = type.GetInterface("IMatchingExperiment");
if (currInterface != null)
{
experiments.Add(type);
continue;
}
currInterface = type.GetInterface("IResourceProvider`1");
if (currInterface != null)
{
var featType = currInterface.GetGenericArguments()[0];
if (!providerByFeatType.ContainsKey(featType))
providerByFeatType.Add(featType, new List<Type>());
providerByFeatType[featType].Add(type);
continue;
}
currInterface = type.GetInterface("IMatcher`1");
if (currInterface != null && !providersByMatcher.ContainsKey(type))
providersByMatcher.Add(type, new List<Type>());
}
}
catch (Exception e)
{
throw e;
}
foreach (var pair in providersByMatcher)
{
var featType = pair.Key.GetInterface("IMatcher`1").GetGenericArguments()[0];
foreach (var provider in providerByFeatType[featType])
pair.Value.Add(provider);
}
cbxExperiment.DataSource = experiments;
cbxExperiment.DisplayMember = "Name";
cbxExperiment.ValueMember = "Name";
cbxMinutiaExtractor.DataSource = mtiaListExtractors;
cbxMinutiaExtractor.DisplayMember = "Name";
cbxMinutiaExtractor.ValueMember = "Name";
cbxOrientationImageExtractor.DataSource = orImgExtractors;
cbxOrientationImageExtractor.DisplayMember = "Name";
cbxOrientationImageExtractor.ValueMember = "Name";
cbxSkeletonImageExtractor.DataSource = skImgExtractors;
cbxSkeletonImageExtractor.DisplayMember = "Name";
cbxSkeletonImageExtractor.ValueMember = "Name";
cbxMatcher.DataSource = new List<Type>(providersByMatcher.Keys);
cbxMatcher.DisplayMember = "Name";
cbxMatcher.ValueMember = "Name";
}
private void btnFindResources_Click(object sender, EventArgs e)
{
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
tbxResources.Text = folderBrowserDialog1.SelectedPath;
}
}
private void btnExecute_Click(object sender, EventArgs e)
{
if (tbxResources.Text == "")
{
MessageBox.Show("Unable to perform experiment: Unspecified resource path!", "Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
return;
}
if (!Directory.Exists(tbxResources.Text))
{
MessageBox.Show("Unable to perform experiment: Invalid resource path!", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
Type resourceType = resourceProvider.GetType();
foreach (PropertyInfo propertyInfo in resourceType.GetProperties())
{
var currInterface = propertyInfo.PropertyType.GetInterface("IResourceProvider`1");
if (currInterface != null)
{
var featType = currInterface.GetGenericArguments()[0];
if (featType == typeof(OrientationImage))
{
resourceType.InvokeMember(propertyInfo.Name, BindingFlags.Public | BindingFlags.Instance | BindingFlags.SetProperty, null, resourceProvider, new object[] { orImgProvider });
continue;
}
if (featType == typeof(List<Minutia>))
{
resourceType.InvokeMember(propertyInfo.Name, BindingFlags.Public | BindingFlags.Instance | BindingFlags.SetProperty, null, resourceProvider, new object[] { mtiaListProvider });
continue;
}
if (featType == typeof(SkeletonImage))
{
resourceType.InvokeMember(propertyInfo.Name, BindingFlags.Public | BindingFlags.Instance | BindingFlags.SetProperty, null, resourceProvider, new object[] { skImgProvider });
continue;
}
}
if (propertyInfo.CanWrite)
{
currInterface = propertyInfo.PropertyType;
if (currInterface.Name == "IFeatureExtractor`1")
{
var featType = currInterface.GetGenericArguments()[0];
if (featType == typeof(OrientationImage))
{
resourceProvider = orImgProvider;
continue;
}
if (featType == typeof(List<Minutia>))
{
resourceProvider = mtiaListProvider;
continue;
}
if (featType == typeof(SkeletonImage))
{
resourceProvider = skImgProvider;
continue;
}
}
}
}
#region disable visual controls
tbxResources.Enabled = false;
btnFindResources.Enabled = false;
cbxExperiment.Enabled = false;
cbxFeatureProvider.Enabled = false;
cbxMatcher.Enabled = false;
cbxMinutiaExtractor.Enabled = false;
cbxOrientationImageExtractor.Enabled = false;
cbxSkeletonImageExtractor.Enabled = false;
gbxProperties.Enabled = false;
btnExecute.Enabled = false;
btnVisualMatch.Enabled = false;
progressBar1.Value = 0;
lblProgressValue.Text = "0%";
#endregion
experiment.ResourcePath = tbxResources.Text;
experiment.ResourceProvider = resourceProvider;
experiment.StatusEvent += StatusUpdated;
experiment.Matcher = matcher;
backgroundWorker1.RunWorkerAsync();
}
private void StatusUpdated(object sender, ProgressChangedEventArgs e)
{
backgroundWorker1.ReportProgress(e.ProgressPercentage, e.UserState);
}
private void cbxMatcher_SelectedValueChanged(object sender, EventArgs e)
{
object selectedValue = ((ComboBox)sender).SelectedItem;
if (selectedValue != null)
{
Type matcherType = (Type)selectedValue;
matcher = Activator.CreateInstance(matcherType) as IMatcher;
cbxFeatureProvider.DataSource = providersByMatcher[matcherType];
cbxFeatureProvider.DisplayMember = "Name";
cbxFeatureProvider.ValueMember = "Name";
cbxMatcher_Enter(sender, e);
}
}
private void cbxFeatureProvider_SelectedValueChanged(object sender, EventArgs e)
{
object selectedValue = ((ComboBox)sender).SelectedItem;
if (selectedValue != null)
{
Type providerType = (Type)selectedValue;
resourceProvider = Activator.CreateInstance(providerType) as IResourceProvider;
cbxFeatureProvider_Enter(sender, e);
}
}
private void cbxFeatureProvider_Enter(object sender, EventArgs e)
{
propertyGrid1.SelectedObject = resourceProvider;
}
private void cbxMatcher_Enter(object sender, EventArgs e)
{
propertyGrid1.SelectedObject = matcher;
}
private void cbxMinutiaExtractor_SelectedValueChanged(object sender, EventArgs e)
{
object selectedValue = ((ComboBox)sender).SelectedItem;
if (selectedValue != null)
{
Type extractorType = (Type)selectedValue;
mtiaListProvider.MinutiaListExtractor = Activator.CreateInstance(extractorType) as IFeatureExtractor<List<Minutia>>;
cbxMinutiaExtractor_Enter(sender, e);
}
}
private void cbxMinutiaExtractor_Enter(object sender, EventArgs e)
{
propertyGrid1.SelectedObject = mtiaListProvider.MinutiaListExtractor;
}
private void cbxOrientationImageExtractor_SelectedValueChanged(object sender, EventArgs e)
{
object selectedValue = ((ComboBox)sender).SelectedItem;
if (selectedValue != null)
{
Type extractorType = (Type)selectedValue;
orImgProvider.OrientationImageExtractor = Activator.CreateInstance(extractorType) as IFeatureExtractor<OrientationImage>;
cbxOrientationImageExtractor_Enter(sender, e);
}
}
private void cbxOrientationImageExtractor_Enter(object sender, EventArgs e)
{
propertyGrid1.SelectedObject = orImgProvider.OrientationImageExtractor;
}
private void cbxSkeletonImageExtractor_SelectedValueChanged(object sender, EventArgs e)
{
object selectedValue = ((ComboBox)sender).SelectedItem;
if (selectedValue != null)
{
Type extractorType = (Type)selectedValue;
skImgProvider.SkeletonImageExtractor = Activator.CreateInstance(extractorType) as IFeatureExtractor<SkeletonImage>;
cbxSkeletonImageExtractor_Enter(sender, e);
}
}
private void cbxSkeletonImageExtractor_Enter(object sender, EventArgs e)
{
propertyGrid1.SelectedObject = skImgProvider.SkeletonImageExtractor;
}
private void cbxExperiment_SelectedValueChanged(object sender, EventArgs e)
{
object selectedValue = ((ComboBox)sender).SelectedItem;
if (selectedValue != null)
{
Type experimentType = (Type)selectedValue;
experiment = Activator.CreateInstance(experimentType) as IMatchingExperiment;
}
}
private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
{
experiment.Execute();
}
}
#region private fields
private MinutiaListProvider mtiaListProvider = new MinutiaListProvider();
private OrientationImageProvider orImgProvider = new OrientationImageProvider();
private SkeletonImageProvider skImgProvider = new SkeletonImageProvider();
private readonly Dictionary<Type, List<Type>> providersByMatcher = new Dictionary<Type, List<Type>>();
private IMatcher matcher;
private IMatchingExperiment experiment;
private IResourceProvider resourceProvider;
#endregion
private void btnVisualMatch_Click(object sender, EventArgs e)
{
if (tbxResources.Text == "")
{
MessageBox.Show("Unable to perform visual matching: Unspecified resource path!", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (!Directory.Exists(tbxResources.Text))
{
MessageBox.Show("Unable to perform visual matching: Invalid resource path!", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
Type resourceType = resourceProvider.GetType();
foreach (PropertyInfo propertyInfo in resourceType.GetProperties())
{
var currInterface = propertyInfo.PropertyType.GetInterface("IResourceProvider`1");
if (currInterface != null)
{
var featType = currInterface.GetGenericArguments()[0];
if (featType == typeof(OrientationImage))
{
resourceType.InvokeMember(propertyInfo.Name, BindingFlags.Public | BindingFlags.Instance | BindingFlags.SetProperty, null, resourceProvider, new object[] { orImgProvider });
continue;
}
if (featType == typeof(List<Minutia>))
{
resourceType.InvokeMember(propertyInfo.Name, BindingFlags.Public | BindingFlags.Instance | BindingFlags.SetProperty, null, resourceProvider, new object[] { mtiaListProvider });
continue;
}
if (featType == typeof(SkeletonImage))
{
resourceType.InvokeMember(propertyInfo.Name, BindingFlags.Public | BindingFlags.Instance | BindingFlags.SetProperty, null, resourceProvider, new object[] { skImgProvider });
continue;
}
}
if (propertyInfo.CanWrite)
{
currInterface = propertyInfo.PropertyType;
if (currInterface.Name == "IFeatureExtractor`1")
{
var featType = currInterface.GetGenericArguments()[0];
if (featType == typeof(OrientationImage))
{
resourceProvider = orImgProvider;
continue;
}
if (featType == typeof(List<Minutia>))
{
resourceProvider = mtiaListProvider;
continue;
}
if (featType == typeof(SkeletonImage))
{
resourceProvider = skImgProvider;
continue;
}
}
}
}
(new VisualFingerprintMatchingFrm(matcher, resourceProvider, tbxResources.Text)).ShowDialog();
}
private void backgroundWorker1_RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e)
{
tbxResources.Enabled = true;
btnFindResources.Enabled = true;
cbxExperiment.Enabled = true;
cbxFeatureProvider.Enabled = true;
cbxMatcher.Enabled = true;
cbxMinutiaExtractor.Enabled = true;
cbxOrientationImageExtractor.Enabled = true;
cbxSkeletonImageExtractor.Enabled = true;
gbxProperties.Enabled = true;
btnExecute.Enabled = true;
btnVisualMatch.Enabled = true;
}
private void backgroundWorker1_ProgressChanged(object sender, System.ComponentModel.ProgressChangedEventArgs e)
{
lblStatus.Text = (string)e.UserState;
lblProgressValue.Text = string.Format("{0}%", e.ProgressPercentage);
progressBar1.Value = e.ProgressPercentage;
}
}
}
0
Programming
Эксперт
39485 / 9562 / 3019
Регистрация: 12.04.2006
Сообщений: 41,671
Блог
31.03.2017, 15:13
Ответы с готовыми решениями:

Сравнение отпечатков пальцев
Текстовый файл содержит информацию по отпечатка пальцев известных преступников. Разработать программа, которая выводит данные обо всех...

Распознавание отпечатков пальцев
Хочу написать софт с авторизацией по отпечатку. Т.е. юзер 1 раз его вводит, он где-то сохраняется, и в следующий раз введенный отпечаток...

Как задействовать сканер отпечатков пальцев?
есть приложение на C# шифрующее текст и ноутбук со сканером отпечатков пальцев. не знаю как задействовать сканер в приложении.

6
2 / 2 / 2
Регистрация: 24.04.2016
Сообщений: 191
31.03.2017, 15:13  [ТС]
форма 2
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using FPRFramework.Core;
using FPRFramework.FeatureDisplay;
 
namespace FPRFramework.Applications
{
    public partial class VisualFingerprintMatchingFrm : Form
    {
      
       public VisualFingerprintMatchingFrm(IMatcher matcher,IResourceProvider resourceProvider,string resourcePath)
        {
            InitializeComponent();
            this.matcher = matcher;
            provider = resourceProvider;
           this.resourcePath = resourcePath;
           repository = new ResourceRepository(resourcePath);
        }
        private void btnLoadQueryImg_Click(object sender, EventArgs e)
        {
            openFileDialog1.InitialDirectory = resourcePath;
          
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                string shortFileName = Path.GetFileNameWithoutExtension(openFileDialog1.FileName);
                try
                {
                    qFeatures = provider.GetResource(shortFileName, repository);
                }
                catch (Exception exc)
                {
                    MessageBox.Show("An error ocurred while loading features with message: " + exc.Message, "Feature Loading Error",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                qImage = ImageLoader.LoadImage(openFileDialog1.FileName);
                pbxQueryImg.Image = qImage;
            }
        }
 
        private void btnLoadTemplateImg_Click(object sender, EventArgs e)
        {
            openFileDialog1.InitialDirectory = resourcePath;
            
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                string shortFileName = Path.GetFileNameWithoutExtension(openFileDialog1.FileName);
                try
                {
                    tFeatures = provider.GetResource(shortFileName, repository);
                }
                catch (Exception exc)
                {
                    MessageBox.Show("An error ocurred while loading features with message: " + exc.Message, "Feature Loading Error",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                tImage = ImageLoader.LoadImage(openFileDialog1.FileName);
                pbxTemplateImg.Image = tImage;
            }
        }
 
        private void ShowResults(double matchingScore, List<MinutiaPair> matchingMtiae)
        {
            if (matchingScore == 0 || matchingMtiae == null)
                MessageBox.Show(string.Format("Similarity: {0}.", matchingScore));
            else
            {
                List<Minutia> qMtiae = new List<Minutia>();
                List<Minutia> tMtiae = new List<Minutia>();
                foreach (MinutiaPair mPair in matchingMtiae)
                {
                    qMtiae.Add(mPair.QueryMtia);
                    tMtiae.Add(mPair.TemplateMtia);
                }
                IFeatureDisplay<List<Minutia>> display = new MinutiaeDisplay();
 
                pbxQueryImg.Image = qImage.Clone() as Bitmap;
                Graphics g = Graphics.FromImage(pbxQueryImg.Image);
                display.Show(qMtiae, g);
                pbxQueryImg.Invalidate();
 
                pbxTemplateImg.Image = tImage.Clone() as Bitmap;
                g = Graphics.FromImage(pbxTemplateImg.Image);
                display.Show(tMtiae, g);
                pbxTemplateImg.Invalidate();
 
                MessageBox.Show(string.Format("Similarity: {0}. Matching minutiae: {1}.", matchingScore,
                                              matchingMtiae.Count));
            }
        }
 
        #region private fields
        private Bitmap qImage, tImage;
        private IResourceProvider provider;
        private ResourceRepository repository;
        private string resourcePath;
        private IMatcher matcher;
        private object qFeatures, tFeatures;
        #endregion
        private void btnMatch_Click(object sender, EventArgs e)
        {
            if (qImage == null)
            {
                MessageBox.Show("Unable to match fingerprints: Unassigned query fingerprint!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (tImage == null)
            {
                MessageBox.Show("Unable to match fingerprints: Unassigned template fingerprint!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            List<MinutiaPair> matchingMtiae = null;
            double score;
            IMinutiaMatcher minutiaMatcher = matcher as IMinutiaMatcher;
            if (minutiaMatcher != null)
            {
                score = minutiaMatcher.Match(qFeatures, tFeatures, out matchingMtiae);
 
                if (qFeatures is List<Minutia> && tFeatures is List<Minutia>)
                {
                    pbxQueryImg.Image = qImage.Clone() as Bitmap;
                    Graphics g1 = Graphics.FromImage(pbxQueryImg.Image);
                    ShowBlueMinutiae(qFeatures as List<Minutia>, g1);
 
                    pbxTemplateImg.Image = tImage.Clone() as Bitmap;
                    Graphics g2 = Graphics.FromImage(pbxTemplateImg.Image);
                    ShowBlueMinutiae(tFeatures as List<Minutia>, g2);
 
                    if (score == 0 || matchingMtiae == null)
                        MessageBox.Show(string.Format("Similarity: {0}.", score));
                    else
                    {
                        List<Minutia> qMtiae = new List<Minutia>();
                        List<Minutia> tMtiae = new List<Minutia>();
                        foreach (MinutiaPair mPair in matchingMtiae)
                        {
                            qMtiae.Add(mPair.QueryMtia);
                            tMtiae.Add(mPair.TemplateMtia);
                        }
                        IFeatureDisplay<List<Minutia>> display = new MinutiaeDisplay();
 
                        display.Show(qMtiae, g1);
                        pbxQueryImg.Invalidate();
 
                        display.Show(tMtiae, g2);
                        pbxTemplateImg.Invalidate();
 
                        MessageBox.Show(string.Format("Similarity: {0}. Matching minutiae: {1}.", score,
                                                      matchingMtiae.Count));
                    }
                }
                else
                    ShowResults(score, matchingMtiae);
            }
            else
            {
                score = matcher.Match(qFeatures, tFeatures);
                ShowResults(score, matchingMtiae);
            }
        }
 
        public void ShowBlueMinutiae(List<Minutia> features, Graphics g)
        {
            int mtiaRadius = 6;
            int lineLength = 18;
            Pen pen = new Pen(Brushes.Blue) { Width = 3 };
            pen.Color = Color.LightBlue;
 
            Pen whitePen = new Pen(Brushes.Blue) { Width = 5 };
            whitePen.Color = Color.White;
 
            int i = 0;
            foreach (Minutia mtia in (IList<Minutia>)features)
            {
                g.DrawEllipse(whitePen, mtia.X - mtiaRadius, mtia.Y - mtiaRadius, 2 * mtiaRadius + 1, 2 * mtiaRadius + 1);
                g.DrawLine(whitePen, mtia.X, mtia.Y, Convert.ToInt32(mtia.X + lineLength * Math.Cos(mtia.Angle)), Convert.ToInt32(mtia.Y + lineLength * Math.Sin(mtia.Angle)));
 
                pen.Color = Color.LightBlue;
 
                g.DrawEllipse(pen, mtia.X - mtiaRadius, mtia.Y - mtiaRadius, 2 * mtiaRadius + 1, 2 * mtiaRadius + 1);
                g.DrawLine(pen, mtia.X, mtia.Y, Convert.ToInt32(mtia.X + lineLength * Math.Cos(mtia.Angle)), Convert.ToInt32(mtia.Y + lineLength * Math.Sin(mtia.Angle)));
                i++;
            }
 
            Minutia lastMtia = ((IList<Minutia>)features)[((IList<Minutia>)features).Count - 1];
            pen.Color = Color.LightBlue;
            g.DrawEllipse(pen, lastMtia.X - mtiaRadius, lastMtia.Y - mtiaRadius, 2 * mtiaRadius + 1, 2 * mtiaRadius + 1);
            g.DrawLine(pen, lastMtia.X, lastMtia.Y, Convert.ToInt32(lastMtia.X + lineLength * Math.Cos(lastMtia.Angle)), Convert.ToInt32(lastMtia.Y + lineLength * Math.Sin(lastMtia.Angle)));
        }
 
    }
}
При открытии первой формы пользователь выберает базу с отпечатками, и выберает настройки или же оставить их по умолчанию, после нажатии на кнопку "btnVisualMatch" открывается форма где происходит как я понял передача данных их формы 1 в форму 2 "public VisualFingerprintMatchingFrm(IMatcher matcher,IResourceProvider resourceProvider,string resourcePath)" во второй форме можно сравнивать 2 отпечатка

Вопрос в следующим...как мне оставить только эту форму а все остальное убрать? то есть мне нужна только вторая форма где можно только сравнивать два отпечатка,что мне нужно в коде изменить?
Помогите пожалуйста
0
4 / 4 / 3
Регистрация: 25.03.2017
Сообщений: 180
Записей в блоге: 2
31.03.2017, 15:29
форум для новичков говорите )?
0
2 / 2 / 2
Регистрация: 24.04.2016
Сообщений: 191
31.03.2017, 15:32  [ТС]
student203, для новичков
0
2 / 2 / 2
Регистрация: 24.04.2016
Сообщений: 191
31.03.2017, 16:32  [ТС]
Пример был взят https://www.codeproject.com/ar... rification

создал форму, в форме использовал следующий код который тоже был в примере из приведенной выше ссылки

C#
1
2
3
4
5
6
7
8
9
10
11
12
// Loading fingerprints
var fingerprintImg1 = ImageLoader.LoadImage(fileName1);
var fingerprintImg2 = ImageLoader.LoadImage(fileName2);
 
// Building feature extractor and extracting features
var featExtractor = new MTripletsExtractor(){ MtiaExtractor = new Ratha1995MinutiaeExtractor()};
var features1  =  featExtractor.ExtractFeatures(fingerprintImg1);
var features2  =  featExtractor.ExtractFeatures(fingerprintImg2);
 
// Building matcher and matching
var matcher = new M3gl();
double similarity = matcher.Match(features1, features2);

сравнение работает, но показывает лишь процентное соотношение
а мне нужно чтобы было еще и визуальное
Помогите пожалуйста
Миниатюры
Сравнение отпечатков пальцев  
0
2 / 2 / 2
Регистрация: 24.04.2016
Сообщений: 191
04.04.2017, 15:20  [ТС]
Вопрос решен, тема закрыта
0
Администратор
Эксперт .NET
 Аватар для OwenGlendower
18261 / 14186 / 5366
Регистрация: 17.03.2014
Сообщений: 28,871
Записей в блоге: 1
04.04.2017, 15:24
Lord_J, в подобных случаях хорошим тоном считается поделится найденным решением
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
inter-admin
Эксперт
29715 / 6470 / 2152
Регистрация: 06.03.2009
Сообщений: 28,500
Блог
04.04.2017, 15:24
Помогаю со студенческими работами здесь

Сканер отпечатков пальцев
Нужен сканер отпечатков пальцев. В инете нашел недорогие usb-устройства, но они с криптофункциями защиты информации, и не известно, можно...

Сканер отпечатков пальцев
Всем привет! Может кто-то игрался со сканером отпечатков пальцев, который на ноутбуки устанавливают? Поиск в инете не дал ничего...

Сканер отпечатков пальцев
Добрый день, возник такой вопрос кто-нибудь когда-нибудь работал со сканером отпечатков пальцев в android устройствах? Как это работает и...

Сканер отпечатков пальцев
Здравствуйте! Можно ли подключится к драйверу сканера для получения изображения (на него нет SDK есть только драйвер и программа к нему в...

Сканер отпечатков пальцев
Недавно получил задачу: создать драйвер и программу для сканера отпечатка пальцев (есть само устройство с установочниками, возможно...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
7
Ответ Создать тему
Новые блоги и статьи
http://iceja.net/ математические сервисы
iceja 20.01.2026
Обновила свой сайт http:/ / iceja. net/ , приделала Fast Fourier Transform экстраполяцию сигналов. Однако предсказывает далеко не каждый сигнал (см ограничения http:/ / iceja. net/ fourier/ docs ). Также. . .
http://iceja.net/ сервер решения полиномов
iceja 18.01.2026
Выкатила http:/ / iceja. net/ сервер решения полиномов (находит действительные корни полиномов методом Штурма). На сайте документация по API, но скажу прямо VPS слабенький и 200 000 полиномов. . .
Расчёт переходных процессов в цепи постоянного тока
igorrr37 16.01.2026
/ * Дана цепь постоянного тока с R, L, C, k(ключ), U, E, J. Программа составляет систему уравнений по 1 и 2 законам Кирхгофа, решает её и находит переходные токи и напряжения на элементах схемы. . . .
Восстановить юзерскрипты Greasemonkey из бэкапа браузера
damix 15.01.2026
Если восстановить из бэкапа профиль Firefox после переустановки винды, то список юзерскриптов в Greasemonkey будет пустым. Но восстановить их можно так. Для этого понадобится консольная утилита. . .
Сукцессия микоризы: основная теория в виде двух уравнений.
anaschu 11.01.2026
https:/ / rutube. ru/ video/ 7a537f578d808e67a3c6fd818a44a5c4/
WordPad для Windows 11
Jel 10.01.2026
WordPad для Windows 11 — это приложение, которое восстанавливает классический текстовый редактор WordPad в операционной системе Windows 11. После того как Microsoft исключила WordPad из. . .
Classic Notepad for Windows 11
Jel 10.01.2026
Old Classic Notepad for Windows 11 Приложение для Windows 11, позволяющее пользователям вернуть классическую версию текстового редактора «Блокнот» из Windows 10. Программа предоставляет более. . .
Почему дизайн решает?
Neotwalker 09.01.2026
В современном мире, где конкуренция за внимание потребителя достигла пика, дизайн становится мощным инструментом для успеха бренда. Это не просто красивый внешний вид продукта или сайта — это. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru