本文介绍了如何在位图指纹图像上获得非零位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我减去了两张指纹图像并得到了结果图像。现在我必须从结果图像中找到非零位置。
我怎样才能得到?请帮帮我。
这是我的减法代码。
I subtracted two fingerprint image and got the resultant image. Now I have to find the non zero location from the resultant image.
How can i get? Please help me for this.
This is my subtraction code.
public static Bitmap subtractImage(Bitmap minuend, Bitmap deduction, int relativeX, int relativeY)
{
Bitmap b = minuend;
Bitmap b1 = deduction;
Bitmap random = new Bitmap(256, 256, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
Graphics g = Graphics.FromImage(random);
g.DrawImage(b, new Point(0, 0));
g.Dispose();
Bitmap rec = new Bitmap(256, 256, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
Graphics g1 = Graphics.FromImage(rec);
g1.DrawImage(b1, new Point(0, 0));
g1.Dispose();
Bitmap result = new Bitmap(256, 256, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
// Bitmap r = new Bitmap(256, 256, , System.Drawing.Imaging.PixelFormat.Format24bppRgb, IntPtr.Size);
//Bitmap rand=new Bitmap(pictureBox1.Image,256,256,System.Drawing.Imaging.PixelFormat.Format24bppRgb,IntPtr.Zero);
//Bitmap rec = new Bitmap(pictureBox2.Image,System.Drawing.Imaging.PixelFormat.Format16bppGrayScale,IntPtr.Zero);
//Bitmap result = new Bitmap(256, 256);
Difference filter = new Difference(random);
result = filter.Apply(rec);
result.Save("d:\\result.bmp");
return result;
}
添加了 pre
标签。
[/编辑]
推荐答案
这篇关于如何在位图指纹图像上获得非零位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!