OCR Sorting Machine

So I have these size beads (s,m,l,xl,xxl) that are put onto apparel items at my store, there's bins full of them. Rather then sorting them by hand, I figured I could make a sorter. Here's the thing, they aren't colored. They are white beads, with black text.

An Arduino is obviously not capable of using optical character recognition. So it'd have to be hooked up to my laptop. Is there a way for a third party program to interact with an Arduino via the usb cable? I guess kinda like a serial monitor sending commands.

I already have the designs figured out, and how it'd function. I just am unsure on how an OCR program can communicate what it's reading to the Arduino.

Multiple approaches:

https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing
And, almost any high level language such as VB or Java.

But, OCR and most consumer applications work only on flat-field views, like from a scanner. Scanning a round object, rendering a flat field view and OCR is not a simple feat, IMO.

Ray

mrburnette:
Scanning a round object, rendering a flat field view and OCR is not a simple feat, IMO.

Damn near impossible, I'd say. Why not use a series of sieves to sort them on their size?

tylerv:
So I have these size beads (s,m,l,xl,xxl)

Do you mean the beads are of different sizes or are they all the same size with different markings (s,m,l,xl,xxl)?

Henry_Best:

tylerv:
So I have these size beads (s,m,l,xl,xxl)

Do you mean the beads are of different sizes or are they all the same size with different markings (s,m,l,xl,xxl)?

They are all the exact same size. Just have different markings on them.

Forget character recognition and go for template matching.
Have a template image of each of the sizes, and match the incoming image against them. The closest wins.

Grumpy_Mike:
Forget character recognition and go for template matching.
Have a template image of each of the sizes, and match the incoming image against them. The closest wins.

How might I go about that? Is there template matching software.. or?

You write it. It is software.
Does everything you do have to have been done before?

FYI, economically, this probably doesn't make sense unless you have 10s of thousands of them or more. That being said, if you are looking for a project, go for it!

I assume that the beads are marked on at least 2 'sides'? Otherwise you may have trouble making sure it is in the right orientation. or you can just reject and refeed any that were in a bad orientation. It'll take longer, but probably is an easier solution than enforcing an orientation.

tylerv:
They are all the exact same size. Just have different markings on them.

What size are the beads? What shape are the beads (spherical, disk, etc)? Are they the sort of size markers that clip onto the hanger?