1. A method comprising: receiving a first array of values obtained from measuring an array of touch panel sensor areas; generating a second array of values based on subtracting a reference array of values from the first array of values; determining presence of at least one touch event in dependence upon the second array of values; and upon a negative determination: generating a new reference array based on exponential smoothing of the reference array and the first array using a weighting factor, wherein the weighting factor is zero; and storing the new reference matrix; and upon a positive determination: outputting the second array.