Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

calculating how many times white pixels appear form frame difference

Hi

I'm now working on this steps to detect blinks

  1. calculate Frame difference = current frame - previous frame using (cv2.absdiff)

  2. convert the result of Frame difference to binary image (threshold cv2.threshold) and cv2.countNonZero() ) .

  3. Eroding and Dilating (cv2.morphologyEx (openmorphologyEx )

with these steps the result is when the eyes blinks there is white pixels like the image below :

image description

.

when the eyes open there is not whote pixels only black output like image below

image description

Now I want to calculate rate of blinks based on white pixels when eyes blinks . for example a counter that counts

how many these white pixels detected . thanks for help