Closed Eye/Open eye

asked 2015-12-10 03:53:29 -0600

Bhavik gravatar image

updated 2020-11-06 00:18:02 -0600

Sorry to create a new thread , but I just need some suggestions.I need to write a java code with opencv to distinguish a person having closed eye fro a person having open eye.What is the best approach to be taken? 1)To train a haar classifier with closed eye and then implement it in the code? 2)use HoughCircles() method to detect the eye ball? I am asking this question because I have gone through some questions and answers in the forum and got to know that haar training is not giving a suitable output. If that is the answer what is to be done to implement the HoughCircle? Or are there any other solutions to this problem? Please Help Thanks in advance

edit retag flag offensive close merge delete

Comments

1

I have done it with detect face, then detect eye then use a SVM classifier that is saying if the person has the eyes closed or opened. I have tried HoughCircles for detecting the iris, or the pupil, not the eye ball and it did not work, because the resolution of the eye was very small. HoG classifier is not very accurate in this approach, because an opened eye or closed one are very similar in the HoGs

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-12-10 04:59:38 -0600 )edit

Please tell me how to use this SVM classifier after eye detection??Sorry to ask such a stupid question,but I am a novice in this,so asking for your help.Or provide me with some links from where I can learn to to train a SVM classifier,and how to use it in code? Thanks in advance :)

Bhavik gravatar imageBhavik ( 2015-12-10 05:34:45 -0600 )edit

I think this tutorial is ok (I have done it similar, but I cannot post the code). For training you need to have all the images in the same size and reshape them in 1 row (SVM needs one row per sample). For predicting you need to resize the detection to the SVM sample size and reshape it to 1 row then predict.

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-12-10 09:06:27 -0600 )edit
2

@thdrksdfthmn thanks for your advice,I will check and get back to you :)

Bhavik gravatar imageBhavik ( 2015-12-10 22:41:45 -0600 )edit
1
thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-12-11 06:49:55 -0600 )edit

Whatever tutorial I an going through,the SVM classifier is used through .cpp code.However I am working on java, are there any tutorial through which I can implement SVM classifier through Java?

Bhavik gravatar imageBhavik ( 2015-12-14 03:22:54 -0600 )edit
1

I am sure you will understand the c++ code, si you just need to transpose it to java. Maybe this may help you a little

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-12-14 03:58:56 -0600 )edit