how to read numbers and text from camera in android? - android

I'm working on android application and it should allow users to take photos using camera and the application reads the text and numbers in the photo.
I don't know where to start from android studio. is there any good suggestion on github that could help me???
thanks in advance.

As others said OpenCV or OCR is the way to go.
Google maintains one OCR library called as "Tesseract" (reminds me of Avengers :P).
To make the job little easier there is a fork of Tesseract called as Tess-Two
It combines some other useful tools like Leptonica (image processing library). Build instructions are given on the Readme file.
To get started you can check out very easy to use OCR library
Easy OCR Library Android which uses Tess-Two under the hood.
Again usage instructions are in the Readme file. It is already built so you don't need to build Tess-Two.

You can try to use OpenCV library. Its abbreviature is Open Computer Vision Library. It has a reputation similar to OpenGL. There must be articles about yor issue in which library is ised. It can be linked static or dynamic using runtime application called OpenCV Manager (available in Google Play). You can use it both in Java and C++ code. Hope, it helps
PS i have an own example of it use.
https://github.com/androidovshchik/ProhibitingSignDetector

i could give suggest about how i would do that if i needed to .
first of all you need to photo the picture only black and white .
then cheack the min black pixels in row that will define a letter .(you dont want any shadow to recognize as potential letter.
try and learn progress (any camera have diffrent resulution so it need to be some % of the picture row pixels.)
after that evrey letter have diffrent shape so you need to do for loop 5 times in diffrent angel until you get to the third gap of black rows.
after that some huge switch and if to get to the right letter need to do big research about the gap inside the letter proportion.
to have a little dataBase could help if you wanted to get more then one font .
again i not sure its the right way but that what i would do.
have fun :)

You may try to find some Optical Character Recognition (OCR) library for Java
Check Java OCR, tess-two, Aprise. And explore stackoverflow searching other OCR solutions.
Implementing your own OCR lib may be very difficult so think is it really necessary for your task.

Related

comparing dog pictures

I am building an android app,
And I want to add the ability that when I take a picture of a dog, I will search in my DB that consist picture of dogs, I want to find the pictures that is the same dog or at least quite similar to him.
Is there any library or github that can be used to compare pictures of dogs?
I'm pretty new at this.
thanks!
You need to use some image processing framework.., Like opencv i have used it for detecting the difference in two images and showing rectangle over the difference area. You can also go for google tensorflow.
Well, if you want to detect images containing dogs, you need a harcascade and you have to train it with positive and negative samples, so that it would learn how to find dogs within images. And answer is not so short it is a machine learning library. If you want to detect dogs are present in given image or not , with c++ and opencv, i can help by providing sample basic programs too
Personally i have used opencv it is great fun in learning and there is also very active forum like stackoverflow for them :
This is the link of opencv forum
Hope it helps :)

Android find document in image

I'm fairly familiar with android application developpement and have created quite a few apps within Android-Studios. Now I'd like to do an app wich can detect a A4 paper in an image and read it's content. Can you name me a couple of libraries/API's? I've checked out OpenCV and Vuforia, but couldn't find something with this particular problem.
Thanks alot!
The best (free) possibility for OCR (Optical Character Recognition) would be Tesseract Engine.
Please note however, that you'll need some background in image processing to get reasonable results.
There are libraries that do the preprocessing for you, but most of them are commercial projects.

Perfect OCR scanning for Android

Right now I'm making an OCR app using Android OCR rmtheis(https://github.com/rmtheis/android-ocr) as a scaffold.
However, I'm far from satisfied.
My main issues:
It returns only a fraction of the containing characters correct when scanning ultra-tiny texts with a few different fonts with
irrelavant clutter such as images and barcodes included (from a
product manual in this case).
The autofocus is looping in a way that if you press the camerabutton when the image is as it's sharpest shape, you might be
0.02 seconds too late and scan the blurry image. So I prefer an autocapture when text is included in the selected view.
Is there any high quality OCR solutions for Android that can capture tricky and small text and getting it all correct almost every time?
Just to clarifie: I use tesseract(tess-two) already through the android-ocr project
On another note: It needs to return close to 100% correct results almost everytime. No language support required, Im only going to use it to catch codes such as 842EAB842EAB842EAB84?2EAB842EAB842EAB with irrelevant english text besides it. Therefore, I need no language support at all.
Edit: This seems to be what I'm looking for:
http://www.abbyy.com/mobileocr/features/
Is there any solution with even higher quality output than Abbyy?
I've also been researching for high quality and free OCR solutions for Android, and finally I've chosen tess-two fork in one of my projects because other options had more disadvantages than advantages. As #realkarim says, it's not 100% accurate but the results are optimal.
Link for an OCR example using tess-two
Try it and comment us your experience ;)
Well, a year ago I was planning to create an Android application in which I needed an OCR, first of all and I'm sorry to say that but you won't find a free "high quality OCR solutions for Android" :/ I used tess-two which is the best free OCR available for android but still it wasn't 100% accurate, probably if I had more time I could add some image processing to enhance the output.
link for the OCR:
https://github.com/rmtheis/tess-two
an example of a running application using it:
http://www.youtube.com/watch?v=Ho5DyK1hKdw
my application:
http://www.youtube.com/watch?v=2PRQo7EWYd8
try it, and add some image processing to the image before using the OCR if you can :)

identifying eyes from images

i am upto recognizing the eye in an image (which is opened).The image is taken by the camera Activity in a tablet.By webservice i could connect it to postgres.But i dont know how i should consider those images to identify the eyes.when i searched i came across OpenCV but im new to it..is there any particular algorithm (name) to identify the eye..when i searched they said its possible in android with the help of opencv by simply importing some packages..but i dont know how to start and from where..can any one plz help me..Something supporting android will be helpful..
If my understanding is correct, there are few differences between the CV4Android library and the OpenCV C++ library. In addition, C++ code can be used by using the Native Development Kit for Android.
With that being said, OpenCV has a C++ tutorial that uses Cascade Classifiers to identify an individual's face and eyes and places a circle around each one of the eyes and a larger circle around the head.
The tutorial can be found here.
Edit: If you're looking for more information on the CV4Android and OpenCV C++ libraries, I'd recommend reading the reply to this question. Hope that helps.

OpenCV for ANDROID image compare

I want to develop app which will recognize object(like monument or something) present in front of camera using OpenCv and then it will show information about it.
So the question is how to recognize object(like monument or something) shape or compare to images with OpenCV?
And what is the best method for doing this?
It would be good if there was some kind of samples or tutorials for object detection and comparison.
Thank you.
The best method for what you ask is using local features detectors like OpenCV's SIFT, SURF and ORB, for example.
You need at least one picture from the object you want to detect. Afterwards, those algorithms can compare that image with other images to see if they are similar enough.
Here is the Documentation for the algorithms.
ORB and others:
http://docs.opencv.org/modules/features2d/doc/feature_detection_and_description.html
SURF and SIFT ('nonfree'):
http://docs.opencv.org/modules/nonfree/doc/feature_detection.html
The way these algorithms work for that task is by selecting interesting points for each image, and compare them to see if they match. If several matches are found, it is most likely the images have the same object.
Tutorials (from Feature Detection and below):
http://docs.opencv.org/doc/tutorials/features2d/table_of_content_features2d/table_of_content_features2d.html
You can also find C++ samples related to this topic here (samples are also within OpenCV download package):
eg. "matching_to_many_images.cpp"
"video_homography.cpp"
http://code.opencv.org/projects/opencv/repository/revisions/master/show/samples/cpp
And Android Java samples here (unrelated but also helpful):
http://code.opencv.org/projects/opencv/repository/revisions/master/show/samples/android
Or Python samples which are actually the more updated ones for this topic (at the time this post was written):
http://code.opencv.org/projects/opencv/repository/revisions/master/show/samples/python2
As a final note, like #BDFun said in the comment, this is not trivial to do.
More - if you want an overview of OpenCV Feature detection and description, check this post.

Categories

Resources