ONR is Copyrighted from 1999 to 2001 by J.Matthews.
ONR can distinguish the numbers 1-9. The source (Visual C 6) is included.
Download (28 Kb)
To look at the data it will learn and test, use the spin buttons under the "Training" and "Classify" buttons to browse through the testing buttons. Now, to train the perceptrons to recognize the data, merely click on "Train" and the learning process will start. With the data set I provide with the program, the iterations should not really get much higher than 20. As a safe-guard, the program will time-out after 500 iterations, so feel free to change the data files.
When learning has finished, the "Classify" button will enable. To then test what has been learnt, use the spin buttons under the "Classify" button to select a data entry that you would like to test. Press "Classify", and the program will write what it thinks the number is underneath. Note: I supplied a test set that produces very good results - with one exception. Try testing the '3' a few times, and you will find the perceptron will occasionally think it's an eight.
The program is VERY easy to expand if you want too (even without understand the code). All you will need to do is change the NN_NUMBERS define clause (in OCRDlg.h) and change the data tests. You might also want to edit the "GetText" function to return the necessary results.
For example, if you want to add the letter "A" to the data set, add:
0 0 1 0 0
0 1 0 1 0
1 0 0 0 1
1 1 1 1 1
1 0 0 0 1
1 0 0 0 1
1 0 0 0 1
To learn.dat, and a 'noisy' version to the test set. Then, change OCRDlg.h to read "#define NN_NUMBERS 10", and add another switch to the GetText function:
case 9: str = "Letter 'A'"; break;
Then recompile, and it should work! Have fun...
