Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

An Easy-to-Understand Explanation of Calibration in Touch-

Screen Systems, Part 1


Faisal Tariq, Senior Applications Engineer, Maxim Integrated Products

Introduction
Mechanical misalignment and scaling factors can lead to a mismatch between the values from a
touch-panel system (in this article the touch-panel system implies a setup comprised of a touch
screen and a touch screen controller) and the display (typically an LCD) on which the touch
screen is mounted. This article discusses the mathematical techniques to calibrate the touch-
panel system so you can match the graphics on the display to the output from the touch-screen
controller.

Understanding Image Transformation: Translation, Rotation, and


Scaling
Figure 1 is an exaggerated view of the distortion that might happen to a circle being displayed
on an LCD touch-screen display. When a finger is traced around the circle (red line), the touch-
panel system may give out the coordinates of an ellipse (blue line) instead of the circle, shown
below in Figure 1. This change of the shape from a circle to an ellipse can be explained by the
following graphic transformations: translation, rotation, and scaling.

Figure 1. A circle changes shape on a touch screen because of a mismatch between the display
and the touch-panel system.

Intuition suggests that any coordinate point x,y in an x-y plane that has undergone a
transformation should look like:

xNEW = f1(xOLD, yOLD) + constant1 (Eq. 1a)

1
yNEW = f2(xOLD, yOLD) + constant2 (Eq. 1b)

Where xNEW and yNEW are the transformed coordinates; xOLD and yOLD are the old coordinates;
f1() and f2() are functions that transform the old coordinates; constants1 and 2 are just that,
constants.

If the transformation is linear, then functions f1() and f2() can be replaced by the following
equations:

xNEW = A xOLD + B yOLD + C (Eq. 2a)


yNEW = D xOLD + E yOLD + F (Eq. 2b)

Where A, B, C, D, E, and F are constant coefficients.


Note that f1() = A xOLD +B yOLD and f2() = D xOLD + E yOLD, where constant1 and constant2 are C
and F, respectively.

About the Author

Faisal Tariq is a Senior Applications Engineer with Maxim Integrated Products. He has been in
the semiconductor industry for over 20 years and holds three patents that focus on flow control.
Mr. Tariq has a BSEE from the University of North Dakota and an MSEE from Kansas State
University.

You might also like