@Asish Here is Unity sample code to check for blinking. You can adjust the blinkLimit if desired (0 fully closed, 1 fully open).
private static float blinkLimit = 0.1f;
private static float leftOpen, rightOpen;
public static bool IsBlinking()
{
// check both eyes open
if (IsWinkingLeft() && IsWinkingRight())
return true;
else
return false;
}
public static bool IsWinkingLeft()
{
SRanipal_Eye.GetEyeOpenness(EyeIndex.LEFT, out leftOpen);
if (leftOpen < blinkLimit)
return true;
else
return false;
}
public static bool IsWinkingRight()
{
SRanipal_Eye.GetEyeOpenness(EyeIndex.RIGHT, out rightOpen);
if (rightOpen < blinkLimit)
return true;
else
return false;
}