First of all i want to thank Andrew for his great work
Go forward Andrew
i try to build an application to detect money values
Following is the ideas i have to done this :
1: detect the value of money ( eg. 1 , 2 ,3)
2: ocr the value
3: print the result
What is done so far is:
1: detect the numbers in white paper as in attachment
2: making some image processing (resizing, convert to gray and convert to array)
3: ocr the image, Andrew’s article http://www.codeproject.com/KB/cs/neural ... k_ocr.aspx help me a lot
But there something i want to help in:
1: is what is done can help in money detection, or try another approach like pattern matching ?
2: how can i increase the accuracy of neural network to detect numbers?
3: is there any approach to convert Bitmap into a double array according to the pixels intensity, so i used the array as pattern to match with the network?
I using this following code to convert bitmap into an array:
- Code: Select all
private double[] convertBitmaptoArray(Bitmap bitmap, int width, int hight)
{
int increment = 0;
int noOfelements = width * hight;
double[] finalarray = new double[noOfelements];
Color[][] colormatrix = new Color[hight][];
Bitmap resizedbitmap = ResizeBitmap(bitmap, width, hight);
Bitmap grayImage = grayFilter.Apply(resizedbitmap);
for (int i = 0; i < resizedbitmap.Width; i++)
{
colormatrix[i] = new Color[hight];
for (int j = 0; j < resizedbitmap.Height; j++)
{
colormatrix[i][j] = grayImage.GetPixel(i, j);
Color c = colormatrix[i][j];
System.Diagnostics.Debug.Flush();
System.Diagnostics.Debug.Print("" + c.R + " " + c.B + " " + c.G);
if (c.R < 60 && c.B < 60 && c.G < 60 )
{
finalarray[increment] = -0.5f;
increment++;
}
else
{
finalarray[increment] = 0.5f;
increment++;
}
}
}
grayImage.Dispose();
return finalarray;
}
waiting your reply
thanks in advance
