A touch panel includes a liquid crystal unit, a lower polarizer, an upper polarizer and a touch sensing structure. A threshold is applied to the adaptive background distance transform image to generate adaptive dilation image output. The transformation module is used for transforming the input image to a plurality of input image values.