Sunday, April 8, 2012

Localization/character extraction!

One of the most difficult problems we anticipated going into this project was extracting characters for the classifier. With a little bit of searching I was able to find this post on stackoverflow that had a quick, easy solution.


The general idea is:

1) Make the image matrix binary
2) Select connected regions using matlab's bwlabel function:
3) Get bounding boxes for these connected regions.

Modifying that code slightly lead to these results:


The bounding boxes for the digits is nearly perfect.



So far the biggest problem to fix with localization is disambiguating = and -. More generally, symbols with multiple non-connected parts are a challenge.I'm thinking of maybe adding a heuristic that searches vertically a distance proportional to max(height, width) for composite parts to merge bounding boxes for. Another technique entirely may be the answer though, or backing off that problem to the parser. Parsing based on position (=, {super,sub}scripts) is the new biggest challenge overall. Localization/bounding box/Character extraction TODO: write code to extract characters based on bounding box to feed into classifier read more papers on the subject fix = vs - problem

No comments:

Post a Comment