This was already done as a student project a decade ago.
Image detection
are you shitting me
There's scikit for python, or if you want to do it by hand you can too, although with a 20-sided die it'll be nowhere as easy as with one with the dots. Anyway, choose some image recognition lib and try it, make sure the dice can be seen clearly by the camera.
Correct.
i was thinking openCV
the serious problem here is to isolate the text from the top, because 9 other sides are visible at any given time
But you know the text beforehand. The one on top should be the best match since the others are at an angle. You could also easily cut the top since you know the size of the die.
what about from an angle or a distance
The distance is also a non-problem since it's known (even if the die isn't dead-center in the box the distance to the camera is pretty much the same). As for angles I don't know, I only used ARToolkit I think it was and it uses/used some patterns so they were easy to identify, worst case you could do the retard solution of rotating it and picking the best.
Was it the one with a bunch of dice being rolled at once?
Character recognition. It has been done many times before.