I tried with simpleCV, got a open source code, with simple modifications i am able to write down a code which is able to detect the blinking (at a particular position of image a small change appears and gone). Now i want to calculate the blinking per minute and want to plot a live graph. I saw some code and projects those used Fourier transform for this kind of work but not able to implement in my project , i finally landed here please help me out thanks in advance:
from SimpleCV import *
cam = Camera()
threshold = 5.0 # if mean exceeds this amount do something
while True:
previous = cam.getImage() #grab a frame
time.sleep(0.5) #wait for half a second
current = cam.getImage() #grab another frame
diff = current - previous
matrix = diff.getNumpy()
mean = matrix.mean()
diff.show()
if mean >= threshold:
print "Motion Detected"