How to crop image on camera preview “Goggles style” - Android

牧云@^-^@ 提交于 2019-12-23 02:32:44

问题


I'm trying to make a small Android application that reads text from pictures. I've already implemented Tesseract tools for Android and I'm able to recognize text from pictures taken with camera. My current problem is that distance for taking picture is really strict. It's not really user friendly if users has to be at very exact distance from text (s)he's trying to read.

I was thinking that best way would do it like in Google Goggles where user is able to crop specific part of image (on camera preview) that (s)he likes to scan. Is there any ready custom cameras (couldn't find any) or have any of you done it?

Thanks, Lasse


回答1:


I'd figure that looking at the ZXing source code may be your best option. It has a specific focal point where it focuses on the main area of the bar code.




回答2:


The Android camera app has cropping code, it doesn't have many dependencies and it is fairly straightforward to integrate in your app. Checkout AOSP code and try it out.




回答3:


I have the same problem in my application.

Here (Crop image ala Google Goggles) you can find a solution but it is not so "clean" like I would, so I'm still looking for something better.

EDIT: Found it! http://adblogcat.com/a-camera-preview-with-a-bounding-box-like-google-goggles/



来源:https://stackoverflow.com/questions/11626869/how-to-crop-image-on-camera-preview-goggles-style-android

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