Home Forums Legacy SDKs Blink frequeny & blink duration using analytics SDK on .NET platform

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #2960
    an676
    Participant

    Hello everybody,

    I started calculating blink frequency for determining the user fatigue. Here is my code.

     if (gd.RightValidity == 4 && gd.LeftValidity == 4)
                {
                    blinkTimer.Start(); // Stopwatch blinkTimer = new Stopwatch();
                }
                else
                {
                   blinkTimer.Stop();
                   if (blinkTimer.ElapsedMilliseconds >= 100 && blinkTimer.ElapsedMilliseconds <= 400)
                   {
                       eyeblinks++;
                   }
    blinkTimer.Reset();
    }

    Please let me know, Is this correct way of calculating using stopwatch.

    Also, Could you please tell me how to calculate the blink Duration i.e time required to Close the eyes?

    Thank you so much in advance.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.