A Physiological Signal Processing System for Optimal Engagement and Attention Detection.