face_rec icon indicating copy to clipboard operation
face_rec copied to clipboard

Blink pattern should be open-closed-open, not closed-open-closed

Open dimitar-bestinc opened this issue 3 years ago • 0 comments

def isBlinking(history, maxFrames):
    """ @history: A string containing the history of eyes status 
         where a '1' means that the eyes were closed and '0' open.
        @maxFrames: The maximal number of successive frames where an eye is closed """
    for i in range(maxFrames):
        pattern = '1' + '0'*(i+1) + '1'
        if pattern in history:
            return True
    return False

I understand why pattern should be '1' + '0'(i+1) + '1', isn't it '0' + '1'(i+1) + '0'?

dimitar-bestinc avatar Aug 28 '21 18:08 dimitar-bestinc