Ignore Blink
AnsweredHey guys, fast question:
Is there any way to ignore fast blinking?
-
Official comment
Hi David,
There's still some noise in the eyes closed detector. We're making progress cleaning that up, but we don't want to overcorrect in case some people want to have their own thresholds for sensitivity.
Here's one example of how we've handled checking for eyes closed and filtered out noise:private float eyeOpenCount_ = 0;
private float eyeClosedCount_ = 0;
private const int kMaxSamples = 9;
// Buffer the eye closed data so that it requires successive changes to count as changed
private bool CheckEyesClosed() {
var eyesClosedEnum = foveInterface.CheckEyesClosed();
bool sdkEyesClosed = eyesClosedEnum == Fove.Managed.EFVR_Eye.Both;
float openVal = (eyesClosedEnum == Fove.EFVR_Eye.Neither) ? 1.0f : 0.2f;
if (sdkEyesClosed) {
eyeClosedCount_ = Mathf.Min(kMaxSamples, ++eyeClosedCount_);
eyeOpenCount_ = kMaxSamples - eyeClosedCount_;
} else {
eyeOpenCount_ += openVal;
eyeOpenCount_ = Mathf.Min(kMaxSamples, eyeOpenCount_);
eyeClosedCount_ = kMaxSamples - eyeOpenCount_;
}
return eyeClosedCount_ > eyeOpenCount_;
}In our case, we opted for an easy-enter, hard-exit strategy where if both eyes are closed more than open it reports eyes closed; but if one eye is open and the other is closed, we are slower to count that toward believing that the eyes are actually open. In this case we wanted to make sure both eyes were closed before returning true so you couldn't fake it by closing only one eye, and accepted that if you opened only one eye it was be a bit slow to determine your eyes were no longer closed.
Of course you'll have your own needs, but hopefully this can get you started. :)-- Scott
Comment actions
Please sign in to leave a comment.
Comments
4 comments