image recognition of words
1 view (last 30 days)
Show older comments
Hey, I have a picture which contains both words and numbers. I have made it binary image, so it's just black and white..here is the picture: http://imgur.com/wqMp5Yh
Is there anyone that have a good idea for a code that I can use to manage to detect the numbers and the words.
I am only interesting in the first line where it stands "ONSDAG 02.10.13 17:00" thanks :)
0 Comments
Accepted Answer
Image Analyst
on 13 Jan 2014
What do you mean by "detect"? Do you mean just simple labeling as distinct blobs? Or do you actually want to do OCR? There is no OCR toolbox for MATLAB that I'm aware of. You could write your own which wouldn't be too hard if you have a single, known font.
Or if you just want to extract that line, that's easy. Just sum up the image in the column direction and threshold to find the dashed line. Then take a certain number of lines below that.
verticalProfile = sum(binaryImage, 2);
dashRow = find(verticalProfile < 1000, 1, 'first'); % Or whatever number works.
croppedImage = binaryImage(dashRow + 10 : dashRow + 300); % or whatever numbers work.
2 Comments
Image Analyst
on 13 Jan 2014
Sorry, forgot the other dimension. Use
croppedImage = binaryImage(dashRow + 10 : dashRow + 300, :);
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!