C# 如何比较两个指纹?

C# 如何比较两个指纹?,c#,match,C#,Match,我正在开发生物特征考勤系统。我在比较两个指纹的像素时遇到问题 bmp1 = new Bitmap(pictureBox1.Image); bmp2 = new Bitmap(pictureBox2.Image); int wid = Math.Min(bmp1.Width, bmp2.Width); int hgt = Math.Min(bmp1.Height, bmp2.Height); Bitmap bmp3 = new Bitmap(wid, hgt); //create the dif

我正在开发生物特征考勤系统。我在比较两个指纹的像素时遇到问题

bmp1 = new Bitmap(pictureBox1.Image);
bmp2 = new Bitmap(pictureBox2.Image);

int wid = Math.Min(bmp1.Width, bmp2.Width);
int hgt = Math.Min(bmp1.Height, bmp2.Height);
Bitmap bmp3 = new Bitmap(wid, hgt);
//create the differences images
bool are_identical = true;
Color eq_color = Color.White;
Color ne_color = Color.Red;

for (int x = 0; x < wid; x++)
{
    for (int y = 0; y < hgt; y++)
    {
        if (bmp1.GetPixel(x, y).Equals(bmp2.GetPixel(x, y)))
        bmp3.SetPixel(x, y, eq_color);
        else
        {
            bmp3.SetPixel(x, y, ne_color);
            are_identical = false;
        }
    }
}

// Display the result.
pictureBox3.Image = bmp3;

this.Cursor = Cursors.Default;
if ((bmp1.Width != bmp2.Width) || (bmp1.Height != bmp2.Height)) are_identical = false;
if (are_identical)
    MessageBox.Show("The images are identical");
else
    MessageBox.Show("The images are different");
bmp1=新位图(pictureBox1.Image);
bmp2=新位图(pictureBox2.Image);
int wid=Math.Min(bmp1.Width,bmp2.Width);
int hgt=数学最小值(bmp1.高度,bmp2.高度);
位图bmp3=新位图(wid、hgt);
//创建不同的图像
布尔值相同=真;
颜色均衡器颜色=颜色。白色;
颜色NEU Color=颜色。红色;
对于(int x=0;x
指纹识别不是那样工作的。通常,这些系统评估指纹的独特特征,而不仅仅是比较图像像素。如果使用正确的方法,则必须使用指纹识别SDK

但是,如果需要比较两幅图像,可以使用图像处理库(如
emgucv
)进行比较


同样,有无数种方法可以进行图像比较。一种简单的方法是使用直方图比较
emgucv
提出了
cvCompareHist
方法,可用于直方图比较。

出于性能原因,您可能希望推动检查维度是否匹配,甚至不启动比较循环(如果不匹配)。除此之外,我不知道问题出在哪里。请提供一些小样本图像,你期望的结果和你实际得到的结果。指纹图像在扫描之间几乎不会完全相同。纹路污垢、手指位置、角度、轻微色差等。进行像素比较不起作用。请检查这些链接,然后重试