Ask Your Question

Arash Karimi's profile - activity

2016-08-03 07:22:19 -0600 commented question Need a flag to shows an eye has been detected

Thanks for your guide

2016-07-31 16:03:36 -0600 commented question Need a flag to shows an eye has been detected

Nop.... you tell me plz

2016-07-31 11:32:14 -0600 commented question Need a flag to shows an eye has been detected

No I just want add some codes to my program to give me a flag when eyes detected

2016-07-30 06:28:08 -0600 asked a question Need a flag to shows an eye has been detected

Hi. I have a code that detect just open eyes and draws a circle around it, Now I need a variable like "A" that should works as a flag that means if an open eye has been detected it should be A=1, and when there is no eye in the picture A=0, to use in following codes. here is a part of my codes :

 face_cascade.detectMultiScale(gray_img, faces, 1.1, 10, CV_HAAR_SCALE_IMAGE | CV_HAAR_DO_CANNY_PRUNING, cvSize(0,0), cvSize(300,300));
      for( int i=0; i < faces.size(); i++){
          Point pt1(faces[i].x+faces[i].width, faces[i].y+faces[i].height);
          Point pt2(faces[i].x, faces[i].y);
          Mat faceROI = gray_img(faces[i]);
          haarcascade_eye.detectMultiScale(faceROI, eyes, 1.2, 40, 0 | CV_HAAR_SCALE_IMAGE, Size(30,30));
          for(size_t j=0; j<eyes.size(); j++){

              Point center(faces[i].x+eyes[j].x+eyes[j].width*0.5, faces[i].y+eyes[j].y+eyes[j].height*0.5);
              int radius = cvRound((eyes[j].width+eyes[j].height)*0.25);

Please help...