Using setImage(byte[],width,height,bpp,bpl) instead of setImage(bitmap) doesn't recognise text.

280 views
Skip to first unread message

Umresh

unread,
Oct 1, 2014, 1:30:39 AM10/1/14
to tesser...@googlegroups.com
Hi,
I have the byte[] in YUV from the vuforia and i wanted to use that data to perform OCR. It doesn't recognise the text correctly.
But when I convert that byte[] to bitmap and use it recognises. I tried the byte[] of the RGB too but it didn't work.

this is the snippet.

setImage(byte[] , width,height,0,width)

0 because the bytes per pixel is 1 and I have read that for binary images bytes per pixel is 0.

zdenko podobny

unread,
Oct 1, 2014, 9:11:08 AM10/1/14
to tesser...@googlegroups.com
After SetImage call (tesseract api) function GetThresholdedImage and save result (leptonica PIX) to disk.
If the output is wrong  you did not set image data to tesseract correctly (e.g. you need to change SetImage parameters).


Zdenko

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at http://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/b9554cbb-79c2-4dc4-b7d5-9779ae53a493%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages