Soon Lee Simple Neural Net / BasicX Hack Page
WebSite
: http://sg.geocities.com/netpsl/ (No Longer Updating)
: http://soonlee.agreatserver.com (New)
Projects
BasicX Hack Page - Just started any one wanna join in the fun?
Classification of Binary Image - The classification of the image base on the number of pixel in each region. Click on Link to find out more.
Object Labeling - An example of now objects in image can be labeled.
2D Pattern Recognition - The recognition of 2D Patterns using Weights.
{ed: most of the above links do not work and the data wasn't posted here so it is lost. Here is what could be recovered}
How to do simple letter recognition?
There are several ways of doing this, this may not be the best but it is the simplest and most easy to understand method. The main concept of how is letter is recognize is by using weights. Each character that you intend to recognize will take up a fix amount of memory in your processor or storage memory this set of memory that is use to store the weight of the character is call the template.
The following are the method that I have used.
Weight Comparing - Comparing of value of the Net and image
Pixel Matching and Error Scaling - Comparing the match and mismatch.
Image ID - A new method that is design for 8 bit micro controller to recognition simple images
The Proposed Method of Letter Recognition
The Image of resolution 160 by 120 is converted into a image Matrix (RGB) of size 80 by 60 by averaging. This method reduces the number of effective pixels being processed and provide noise reduction . (Mean filtering)
The RGB Matrix is convert into Grayscale using the following weight unit for each color.
11% for Red, 59% for Green, 30% for Blue
If there is not enough computation time simply use the green channel as grayscale.
The effective threshold will depend on lighting condition with good lighting , the average value of the matrix can be use as the threshold.
Apply filtering (if needed)
Using 4-Connect sequential algorithm to locate all the possible objects (may include some noise)
Based on the upper and lower XY position of the objects can deduce if the current object is a noise or possible objects.
The ratio of the Length in X and Y can be use to deduce if the object is too long or too short in size.
The average pixel ratio of the object window area can serve as a rough guide to check if the object can be match with any of the template.
Once the object passes all the checks, the image is copy and recognition is done using the projection search (ImageID) follow by weight recognition.
Weight Comparing
When using this method the result will be more actual as the Error will be proportional to the number of pixel and is scale according to the value weight.
Example if your input device (camera) give you a image of resolution 100 by 80 Pix. Then the size if each character template will be of size of 8000 Bytes. The size of the weight will depend on user, the more number you can have in your weights the better your system.
Input | ||
+A | -B | +C |
-D | +E | -F |
+G | -H | -I |
Template 1 | ||
+10 | -10 | +10 |
-10 | +10 | -10 |
+10 | -10 | -10 |
Template 2 | ||
-10 | -10 | -10 |
-10 | +10 | -10 |
-10 | -10 | -10 |
A negative value in the weight template signify that the template is expecting a negative value in the input image.
Result when the input when it is compare with the Template 1 and 2 will be
Assume that the value of A,B,C,D,E,F,G,H,I = 1
Recog % (Template 1) = {-10(A+B+G) + 10(B+D+E+F+H+I)} / Sum of Template (90) ----> Total 3 mismatch
Recog % (Template 2) = {-10(A+C+D+E+F+G+H) - 10I} / Sum of Template (90) ----> Total 1 mismatch
The value Recog % (Template 1) is 90 %
The value Recog % (Template 2) is 30 %
This process is then repeated till all the templates have been compared. With enough training to the system , normally the one with the highest percentage is the one that is most similar to the input hence the letter.
Note that in real life situation the value of the weights will not be so nicely valued like the one I had. It may be of any values depending on how the user define it.
Pixels Matching and Error Scaling
This method is the most simple to implement on Micro controllers as the complexity of the the equation is very simple. This method emphasize more on the match of the location of the pixels. Weights are not involve in the calculation of matching percentage but will be require during training of the net.
The result of the recognition ins base on the number sum of matching pixels divide by then total of pixel scan. To improve the performance of the method error scaling in introduce. When ever there is a mismatch, a error value with is a few times more is added. this will cause the sum of match value to decrease.
This method will not work well if the scan pixel is below 20. As the less pixel mean that each mismatch will take up more percentage. It will be every effective if it is use with image more then 100 where the weight of each pix is only 1%.
Image ID
Image ID as the name suggest it is to identify a imagine with a unique ID number. If every image have its own unique ID, it will be possible for us to match the image to our template with out going through the convention way of calculation. By Weight or Pixel matching This ID or streams of numbers will not only help to identify the image , it will also help to reduce the number of possible search.
In a database of 256 images, it is a must to go through all the 256 images during very recognition process?
With this new method we can selectivity recognition the image that may be of possible match and hence reducing time in computing. Some thing that can be implemented on a small scale 8 bit micro controller. Note there are actually a lot more methods but most of them are too complicated to be implemented on a 8 bit micro controller.
The method that I have described is currently under test and prelim results are excellent. I have created the program in VB6 and it is working fine. Rest assure that all the function that are use in VB are implementable on a micro controller. The program can reduce the number of template search to a small number and giving 100% recognition rate on same objects.
This is the image that is stored in the database. The numbers at the side of the image is the ImageID that I am taking about all the while. To further enhance the ability of this method I have added the Average and Quadrant count.
Quadrant: Is the number of Pixel in each of the quadrant.
Average: Is the average if the quadrant values.
file: /Techref/member/L030010-YAHOO-E63/index.htm, 8KB, , updated: 2015/8/28 09:45, local time: 2024/8/31 22:26,
3.135.188.58:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://ecomorder.com/Techref/member/L030010-YAHOO-E63/index.htm"> Soon Lee Image HomePage</A> |
Did you find what you needed? |