- Project Idea | ( Character Recognition from Image )
- Recommended Posts:
- Automatically Detect and Recognize Text in Natural Images
- CHARACTER RECOGNITION FROM AN IMAGE USING MATLAB
- Subscribe to RSS
- Recognize Text Using Optical Character Recognition (OCR)
- car license plate character recognition using OCR
- Turn ideas into MATLAB
- Your Answer
Project Idea | ( Character Recognition from Image )
I have used the above code for image segmentation and extraction but how can we use knn for classification? I need help with the code.
I have searched knn classify in mathworks but I am unable to understand the syntax. Any help with code would be appreciated. If I am correct, my aim is to predict the characters in matlab compiler or in notepad after classification using knn but I am unable to code the k nearest neighbor after the above code.
So what you've done here is to take an image of a word, and successfully separated the image into some smaller images of individual characters. That's an important first step, but there are quite a few more steps to go before you can think about applying KNN for character recognition.
You will need to get a much larger set of character images.
I've never personally done character recognition before, but from my experience in other classification tasks, I would estimate that to get good results you are likely to need at least a few thousand images of characters. If you're doing this as an exercise in teaching yourself, then instead of doing 1 and 2 yourself, I'm sure there are datasets available on the internet for free, containing large sets of pre-labelled character images, for people to use in trying out new algorithms.
You will need to do some feature extraction on each image. This means that you need to come up with several features that you measure for each image - features that are likely to correlate highly with the thing you're trying to predict in this case which character the image is of.
I'm not an expert in character recognition at all, but I would suggest that useful features might be things like the number of holes in the character, the number of straight lines in the character, whether the lines are horizontal or vertical, and the length of the lines relative to the overall character.
You will need to evaluate those features on each of your character images. In order to automate that, you will need to write some more image processing code to detect and measure each of the features. This dataset is what you apply KNN to. You would typically split the dataset into two parts, one for training and one for testing.
Automatically Detect and Recognize Text in Natural Images
The output is predicted labels for the test dataset. Compare these with the actual labels to see how accurate you were. Learn more.
How to use K nearest neighbor classification for character prediction Ask Question. Asked 4 years, 10 months ago. Active 4 years, 10 months ago.
CHARACTER RECOGNITION FROM AN IMAGE USING MATLAB
Viewed 3k times. I have got the result below after the execution: If I am correct, my aim is to predict the characters in matlab compiler or in notepad after classification using knn but I am unable to code the k nearest neighbor after the above code.
Subscribe to RSS
Do you have one? Some comments: 1 This code is in no way doing KNN at all. All you're doing is extracting out objects 2 If you want to use KNN, you need to have a set of ground truth data or some data that you want to compare a query to in order to match characters.
Is your data pixels?
Recognize Text Using Optical Character Recognition (OCR)
Features you extracted from the pixels? Some parameters that describe how the shape of each character is defined, like arcs? Your question cannot be answered until you provide more insight on your data. You will need to manually determine the correct character for each image. I hope this helps - good luck!
car license plate character recognition using OCR
Sam Roberts Sam Roberts Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
Turn ideas into MATLAB
Email Required, but never shown. How to create micro-interactions with react-spring: Part 1. This week, StackOverflowKnows syntactic sugar, overfit or nah, and the…. Featured on Meta.
Thank you, Shog9. Thank you, Robert Cartaino. Has Stack Exchange rescinded moderator access to the featured tag on Meta? How do the moderator resignations affect me and the community?
Related Hot Network Questions.