eye-detection

How to detect coordinates of left and right eye using android face detection

泪湿孤枕 提交于 2021-01-28 04:33:57
问题 Hello I am new to android. I want to detect the coordinates of left and right eye along with hairs in an image. In this link it shows that what are the methods to detect eyes that but I am not able to implement these methods. Also I want to detect the hairs in the image so how can I do that. 回答1: With the mobile vision API, left and right eyes can be detected as facial landmarks. See the tutorial for detecting landmarks here: https://developers.google.com/vision/detect-faces-tutorial and the

Eye detection within face

三世轮回 提交于 2020-01-15 10:31:32
问题 I am trying to detect eyes which only fall within the face region and hence I did some minor alterations to the code: if( cascade ) { double t = (double)cvGetTickCount(); CvSeq* faces = cvHaarDetectObjects( small_img, cascade, storage, 1.1, 2, 0|CV_HAAR_DO_CANNY_PRUNING, cvSize(30, 30) ); t = (double)cvGetTickCount() - t; printf( "detection time = %gms\n", t/((double)cvGetTickFrequency()*1000.) ); for( i = 0; i < (faces ? faces->total : 0); i++ ) { CvRect* r = (CvRect*)cvGetSeqElem( faces, i

Unable to detect face and eye with OpenCV in Python

浪尽此生 提交于 2019-12-25 09:16:00
问题 This code is to detect face and eyes using webcam but getting this error Traceback (most recent call last): File "D:/Acads/7.1 Sem/BTP/FaceDetect-master/6.py", line 28, in <module> eyes = eyeCascade.detectMultiScale(roi) NameError: name 'roi' is not defined but when i use this code do detect faces and eyes in a image its working properly without any error import matplotlib import matplotlib.pyplot as plt import cv2 import sys import numpy as np import os faceCascade = cv2.CascadeClassifier(

OpenCV for Android: failed to load cascade classifier error

假装没事ソ 提交于 2019-12-19 02:46:18
问题 This is the first time I use openCV library. I want to use it to detect the eyes. I have used the FdActivity code available in this tutorial: http://romanhosek.cz/android-eye-detection-updated-for-opencv-2-4-6/ The tutorial uses OpenCV 2.4.6, but I have downloaded version 3.1 in my project. Due to the version differences I have changed the lines that uses putText, rectangle, and circle to be imported from imgproc instead of Core. This is all what I've changed. I have added haarcascade_lefteye

Opencv - detecting whether the eye is closed or open

左心房为你撑大大i 提交于 2019-12-18 13:47:44
问题 Hi guys I am working on a project where we are trying to detect whether the eye is closed or open in a picture ... what we done so far is that we detected the face then the eyes and then we applied hough transform hoping that the Iris would be the only circle when the eye is open the problem is that when the eye is closed ... it produces a circle as well Here is the code: import org.opencv.core.Core; import org.opencv.core.Mat; import org.opencv.core.MatOfRect; import org.opencv.core.Point;

Running OpenCV eye detection from within Android service

霸气de小男生 提交于 2019-12-11 01:58:21
问题 I want to run eye detection by OpenCV4Android from Android background service. I have a piece of code that runs well but as an Activity not service. I understand that the Android camera must have a preview to open. So I have created a preview (small one to make it looks hidden, since I want the processing to be in the background) and started the camera for recording. The camera starts successfully, but OpenCV doesn't detect eyes and faces. It only loads the xml classifiers. I expected the

Find eyes and mouth in an face image

微笑、不失礼 提交于 2019-12-07 10:55:43
问题 I'm curious about finding the eyes from an image. Let's say I have an thresholded image and I have 3 blobs representing two eyes and the mouth. Is there a way to detect which of the region of pixels is eye region and approximate it's center? 回答1: You can check the following blog which is much equipped with facial landmarks detection including eye regions. It will be very much easier to find approximate center of eye. It gives six points (37-42 left eye & 43-48 right eye) of eye along the eye

how to perform stable eye corner detection?

﹥>﹥吖頭↗ 提交于 2019-12-04 08:06:07
问题 For those who find it too long, just read the bold lines. My project of gaze estimation based screen cursor moving HCI is now dependent on one last thing - gaze estimation, for which i'm using eye corners as a reference stable point relative to which i will detect the movement of the pupil and calculate the gaze. But i haven't been able to stably detect eye corners from live webcam feed. I've been using cv.CornerHarris() and GFTT - cv.GoodFeaturesToTrack() functions for corner detection. I

how to perform stable eye corner detection?

天大地大妈咪最大 提交于 2019-12-02 21:49:59
For those who find it too long, just read the bold lines. My project of gaze estimation based screen cursor moving HCI is now dependent on one last thing - gaze estimation, for which i'm using eye corners as a reference stable point relative to which i will detect the movement of the pupil and calculate the gaze. But i haven't been able to stably detect eye corners from live webcam feed. I've been using cv.CornerHarris() and GFTT - cv.GoodFeaturesToTrack() functions for corner detection. I tried FAST demo (the executable from their website) directly on my eye images but that wasn't good. These

OpenCV for Android: failed to load cascade classifier error

流过昼夜 提交于 2019-11-30 20:11:25
This is the first time I use openCV library. I want to use it to detect the eyes. I have used the FdActivity code available in this tutorial: http://romanhosek.cz/android-eye-detection-updated-for-opencv-2-4-6/ The tutorial uses OpenCV 2.4.6, but I have downloaded version 3.1 in my project. Due to the version differences I have changed the lines that uses putText, rectangle, and circle to be imported from imgproc instead of Core. This is all what I've changed. I have added haarcascade_lefteye_2splits.xml and lbpcascade_frontalface.xml to the raw folder under res folder. When running the app I