How to detect glasses on the face ?

7 views (last 30 days)
I am doing a project just to detect if the person is wearing glasses or not. I have a training database. I want to use a neural network for this. I want to train the neural network with features of the image near the eye.
Does anyone know how to extract features near the eye using Matlab ?
I tried the vision.cascadedetector in Matlab but it gave [0,4] as the value for the bounding box.
Is there any other way to get the features of the eye. Please help me.
Thank you for the help.

Accepted Answer

Dima Lisin
Dima Lisin on 6 Mar 2015
Hi Varun,
I would try using vision.CascadeObjectDetector to detect the face first. Then, I would try to detect the eyes inside the detected face regions.
To determine whether the person is wearing glasses you would need to train your own glasses vs. no glasses classifier. There is a variety of methods for doing that. For example, you can try using HOG features and the SVM classifier.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!