Ask Your Question

Shreya's profile - activity

2013-12-04 03:17:04 -0600 received badge  Supporter (source)
2013-03-25 03:38:29 -0600 asked a question Eye Blink Related

Hi, I am new to opencv and I need help. I am working on Ubuntu and programming in C and I have detected the single eye blink of a person. Now I want to make a blinking pattern such that if a person blinks continuously (3 times in 3-4 seconds) the pattern is recognized.

I have thought of a logic but dont know how to implement it.

  1. Store the start & end time of the blink in 2 arrays.
  2. Then check the end time of a second blink and subtract it from start time of the first blink. Set a threshold of 3-4 seconds.
  3. If subtraction is more than threshold, discard it, if not go for the next blink.
  4. If 3 blinks found in 3-4 sec called it as pattern found.

I am new to C also, so it would be great if somebody could help me out. Thanking in anticipation.

Edited by Steven Puttemans to make the question and suggested approach actually clear

2013-02-11 23:20:21 -0600 asked a question face_eyes detection and tracking using opencv

I am working on eye blinking using opencv 2.4.3 in C on unbuntu platform. I was able to detect to face and eyes in live video using Haar cascades, but when I tilt my face, Algorithm cannot detect the face, and I have also read it on net that if face is tilt it cannot detect. So I think tracking can be helpful. Can anybody help me out, how should I track face and eyes in live video.

2013-01-29 22:56:52 -0600 answered a question openCv 1.1 to openCv2.4.3

Yuo will find latest version of opencv i.e 2.4.3 here : http://docs.opencv.org/. I think latest version is more simple than the old, just the syntax change, You can refer to the documentation and search for modified syntax, The names used to call the function are same just a bit change, for example for Mat function, you need call it as CvMat. Just try and go through the document you will get.

2013-01-02 23:18:01 -0600 received badge  Editor (source)
2013-01-02 23:13:31 -0600 asked a question facedetection using python opencv-2.3.1

Hi, I am trying to detect face from the video captured by the webcam, I tried the code but when I run it on my webcam light is switched on, but I am not able to see any screen capturing the video. I am using opencv libraries in python on Ubuntu.I am not getting any error, Can anybody help me out. Here is my code:

 import sys
 from opencv import cv
 from opencv import highgui

 HAAR_CASCADE_PATH ="/home/vidula/OpenCV-2.3.1/data/haarcascades    /haarcascade_frontalface_default.xml"

def detect_faces(frame):
faces = []
detected = highgui.cvHaarDetectObjects(frame, cascade, storage, 1.2, 2, cv.CV_HAAR_DO_CANNY_PRUNING,(100,100))

if detected:
    for (x,y,w,h),n in detected:
        faces.append((x,y,w,h))
        return faces

if __name__ == "__main__":
  highgui.cvNamedWindow("Camera", highgui.CV_WINDOW_AUTOSIZE)
  #capture = highgui.cvCaptureFromCAM(0)
  capture = highgui.cvCreateCameraCapture(0)
  storage = cv.cvCreateMemStorage()
  cascade = highgui.cvLoadImage(HAAR_CASCADE_PATH)

  faces = []

i = 0

while True:
frame = highgui.cvQueryFrame(capture)
if i%5==0:
    faces = detect_faces(frame)

for (x,y,w,h) in faces:
    cv.Rectangle(frame,(x,y), (x+w,y+h),255)

#if frame is None:
    #break
highgui.cvShowImage ('Camera', frame)
i += 1
cv.WaitKey(10)
#k = highgui.cvWaitKey (10)
#if k == '\x1b':
 #  break

I think there is problem in cvHaarDetectObject but I dnt know what should I do next.

Thankyou in advance.