Number and text detection possible with opencv android while video capture?

旧城冷巷雨未停 提交于 2019-12-10 17:17:15

问题


Is it possible to detect numbers or text while capturing video in android using opencv or any other best image& video processing api's


回答1:


You will need a capable OCR engine which will try to detect characters by any number of means. Tesseract is a good open source engine which will try to 'parse' your image for characters by masking.

However, there are several steps or approaches you need to take before you feed your OCR engine(Tesseract) your image. In order to ensure more accurate results, you need to 'clean' your image using binarization along with a number of other conventional methods such as 'canny' edge detection. This is where 'OpenCV' can help.

Also, you should isolate/detect characters in images. This can be done with powerful algorithms such as the Stroke Width Transform

Regarding detection on a video stream in android, you can run your captured frames through the cleansing and OCR engine as they are recieved through:

onPreviewFrame(byte[] data, Camera camera)

Also, check out this app which allows OCR in 'continuous preview' mode.

Hope this helps




回答2:


Yes, you can. OpenCV 3.0.0 includes a text detection tool which is based in Extremal Region detection and classification. You can use this in a video stream. Notice that this is detection, and the results can be used as the input of any OCR (as Tesseract). But remember:

Image -> Text Detection -> Preprocessing (binarization,etc) -> OCR -> Recognized Text

Hope that it helps!



来源:https://stackoverflow.com/questions/23104244/number-and-text-detection-possible-with-opencv-android-while-video-capture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!