calculating how many times white pixels appear form frame difference
Hi
I'm now working on this steps to detect blinks
calculate Frame difference = current frame - previous frame using (cv2.absdiff)
convert the result of Frame difference to binary image (threshold cv2.threshold) and cv2.countNonZero() ) .
Eroding and Dilating (cv2.morphologyEx (openmorphologyEx )
with these steps the result is when the eyes blinks there is white pixels like the image below :
.
when the eyes open there is not whote pixels only black output like image below
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