1
$\begingroup$

I am working on letter recognition program. I have a text and divide it into letters, every single letter is written to separate file.

Now I want to apply a clustering algorithm to these images to divide letters into classes. Ideally each cluster would correspond to single letter (this is not possible, because some letter patterns like "ri" or "ff" are classified as one letter by my text-dividing algorithm, but I'll address that later). The images contain some noise, as the text is scanned and also not every letter is at the center of the image: some are slightly shifted.

I am quite new to machine learning. Could you advise me on the choice of clustering algorithm? Which would give the best results in this case?

PS.: I am using python for this project, so any algorithms that have implementation in python (even partial) are of particular interest to me.

$\endgroup$
  • 1
    $\begingroup$ this question is on the border of what is deemed within scope for this site. you might want to ask around on stats.SE or on metaoptimize.com $\endgroup$ – Suresh Venkat Apr 13 '11 at 22:45
  • $\begingroup$ Thanks, I posted on metaoptimize as well. Unfortunately my question is too simple for cstheory and too theoretical for stackoverflow. $\endgroup$ – pajton Apr 13 '11 at 23:01
  • 1
    $\begingroup$ stats.stackexchange.com is also a good place, but I can tell you right now that your question is not very well formed. $\endgroup$ – Suresh Venkat Apr 14 '11 at 3:39
1
$\begingroup$

Check my project ImSim at sf.net: http://sourceforge.net/projects/imsim Actually it's just a very short, simple and single script in Python. It can be adjusted for the purpose of clusterizing very easily.
P.S. Remove resizing from it -- I guess you need not it.
P.P.S. Surely you know PIL library.

$\endgroup$
  • $\begingroup$ I checked out your code, but I see you are only computing simple statistics for each image and then comparing them based on that. So its not really a full-fledged clustering algorithm... Still, it may prove useful, thanks! $\endgroup$ – pajton Apr 13 '11 at 23:03
  • $\begingroup$ heh :-) You are too quick on judging. It's not a "simple" statistics - it's a spatial distribution statistics. And remember one thing: more complex you do your way - worse results you get (but usually this slipped unnoticed - nothing to compare to - and you keep on nourishing idea that you chose the best approach). $\endgroup$ – trg787 Apr 13 '11 at 23:11
  • $\begingroup$ I agree that the simpliest ideas are often the best. Sorry, I may have been too quick - I do not know what is spatial distribution. What it is? $\endgroup$ – pajton Apr 14 '11 at 12:51
  • $\begingroup$ Never mind, all is Ok. $\endgroup$ – trg787 Apr 14 '11 at 12:58
  • $\begingroup$ [Never mind, all is Ok] Spatial in my case is: I divide a pic into 5 horiz stripes and 5 vert stripes, calculate total intensities (or luminosities) in each stipee... well, my script is very straightforward. Note that dividing the pic into squares will produce worse result. 5 & 5 is optimal, more granularity -- and pheeeww, your upper lip moves up and you frown (sorry I'm a bit in a kind of frivolic/poetric mood) $\endgroup$ – trg787 Apr 14 '11 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.