identifying eyes from images - android

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.

Related

Detect glare in image

I'm using googles cameraX library to scan some documents and to help the user to take the best possible image I would like to detect if there is any glare live in the camera.
With all searches I have made most suggestions point to the OpenCv library which I don't want to import into my project just for detecting glare. Does anyone know any algorithm for glare detection in an image?
The closest answer I have found is this answer, but I'm not really sure how to effectively put that into practice in android using kotlin.

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.

how to read numbers and text from camera in 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.

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.

Detecting edges of image in android using OpenCV?

In my application , i need to capture image(coins on table ) and then detect its edges. i got to know that OpenCV works good for this scenerio. I ported OpenCV on android, installed sample CVCamera is working fine.But i didnt find how to call generic methods ? can any one tell me how to accomplish my task using OpenCV ?
Thank u,
Srinivas
There are lots of tutorials and samples on the web devoted to edge detection with opencv. For example here you will find one which uses opencv/canny algorithm. And here you will find the opencv documentation on the topic.
I'm assuming you are using this port of opencv to Android: http://opencv.willowgarage.com/wiki/AndroidExperimental . You will find the android-experimental/opencv/android/apps/OpenCV_SAMPLE/ the sample of canny algorithm on android.

Categories

Resources