i use the text recognizer (based on the above code) all the time.
i don't understand why erel says he didn't get valid results. i don't use pages (yet. a slow learning curve for me.), so my use is non-page and with his camex class).
in comparing the code above with the code in my app, the only difference i noticed has to do with frame orientation. as you probably know, ocr can't read anything tending towards upside down.
my case is, perhaps, special, because it involved a nexus 5 and its particular camera orientation. i also use the code on non-nexus 5 devices. in any case, below find my code relating to frame orientation:
Dim rotation As Int = camex.PreviewOrientation
Log("rotation: " & rotation)
Dim newrotation As Int
' .setRotation(metadata.getRotation())
Select rotation
Case 0
newrotation = 0
Case 180
newrotation = 2
Case 90
newrotation = 1
Case 270
newrotation = 3
End Select
If newrotation <> 0 Then
frameBuilder.RunMethod("setRotation",Array(newrotation)) ' 3 = 270
End If
it goes just before passing the frame off to the detector
Dim SparseArray As JavaObject = ocrdetector.RunMethod("detect", Array(frame))
to be clear, it doesn't matter what you think you see on the screen; the detector may see the same thing at 90 degrees (or more) offset and cannot detect the text.
if erel happens to visit this thread again, he might confirm whether or not he thinks frame orientation is relevant to his code. you, of course, are welcome to try the code yourself.