指纹如何二值化? [英] How binarization Finger Print?

查看:74
本文介绍了指纹如何二值化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我需要代码将指纹二值化??
AnyBody可以帮助我吗?
这是我的算法吗?

Hi I need Code To binarization FingerPrint???
AnyBody Can Help Me?
This My Algorithm,Is It Currect???

byte[] s = new byte[7*7];

            //bin.bit is byte 2D and store each pixel of image
            //this algorithm mask 7*7
            

            for (int i = 3; i < bin.bite.GetLength(0) - 4; i++)
                for (int j = 3; j < bin.bite.GetLength(1) - 4; j++)
                {
                    int ind = 0;
                    for(int u=i-3;u<i+4;u++)>
                        for (int v = j - 3; v < j + 4; v++)
                        {
                            s[ind] = bin.bite[u, v];
                            ind++;
                        }


                    byte[] s2 = _sort(s);//_sort Function sort ASCENDANT element
 
                    byte mean =(byte) (((s2[0] + s[48])/2)-7);



                    if (bin.bite[i, j] < mean)
                    {
                        bin.Image.SetPixel(i, j, Color.Black);
                        bin.bite[i, j] = (byte)(0);
                    }
                    else
                    {
                        bin.Image.SetPixel(i, j, Color.White);
                        bin.bite[i, j] = (byte)(1);
                    }
                    

                }

推荐答案

如果它符合您的期望,是正确的,如果它没有满足您的期望,则询问我们并解释该特定问题,我们也许可以为您提供帮助.
It''s is correct if it does what you expect it to, if it does not do what you expect it to, then asks us and explaining that particular problem and we might be able to help you.


这篇关于指纹如何二值化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆