计算像素或计数脊 [英] Count pixels or count ridge
本文介绍了计算像素或计数脊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我在基于生物识别/指纹的项目上工作。
我完成了大部分基于的模块。
但是在最后阶段...自动计算图像中两点之间的指纹脊......绞死我。
我用Java完成了这项工作。但C#中的问题。
Hello everybody,
I m work on a project based on Biometrics/ Fingerprint.
I completed mostly modules based on.
but at last stage... Auto counting fingerprint ridge between two points from image... hanged me.
I work done this in Java Perfectly.. But problem in C#.
My java code here:
java.util.ArrayList arr = (java.util.ArrayList)getco_ordinate(width, height, x1, y1, x2, y2);
java.awt.Point pp = (java.awt.Point)arr.get(i);
int px = pp.x;
int py = pp.y;
java.awt.image.BufferedImage currentworkingprocessimage;
getARGBPixelData(currentworkingprocessimage.getRGB(px, py));
/*method*/
public void getARGBPixelData(int pixel)
{
java.lang.String pixelARGBData = "";
a = pixel >> 24 & 0xff;
r = pixel >> 16 & 0xff;
g = pixel >> 8 & 0xff;
b = pixel & 0xff;
}
every thing ok but problem line is :
"java.awt.image.BufferedImage currentworkingprocessimage;
getARGBPixelData(currentworkingprocessimage.getRGB(px, py));"
there r no getRGB method in System.Drawing.Bitmap or System.Windows.Media.BitmapImage
any option doing this
请帮忙..
提前感谢
我尝试过:
i已尝试但结果为null ...
please help..
thanks in advance
What I have tried:
i have tried but result null...
推荐答案
在System.Drawing.Bitmap
有一个GetPixel(x,y)
方法,它返回System.Drawing.Color
值。
Color有ToArgb
和FromArgb
和ToString
应该为y服务的方法我们的需求。
注意: GetPixel(x,y)方法非常慢。请参阅谢尔盖的解决方案3讨论 [ ^ ]
InSystem.Drawing.Bitmap
there is aGetPixel(x,y)
method that returns aSystem.Drawing.Color
value.
The Color hasToArgb
andFromArgb
andToString
methods which should serve your needs.
NOTE: the GetPixel(x,y) method is exceedingly slow. See Sergey's Solution 3 discussion here[^]
这篇关于计算像素或计数脊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文