Specifications
CARROLL TOUCH Chapter 3 - General Programming Issues
Touch System Programmer’s Guide 3-7
Once calibration is completed, the host software may use the calibration 
parameters to convert touch coordinates into video coordinates (pixel 
coordinates). These may then be used in the remainder of the host 
software.
Some monitors do not maintain a constant video image size and 
placement for all of the video modes that they support. For this reason, 
the calibration should be performed using the same video mode as the 
touch application in order to assure an accurate calibration.
Floating Point Calibration Program Design
When designing a program to calibrate the touch screen, include the 
following steps:
1. Prompt the user to touch the upper left corner of the video screen.
2. Save the coordinates returned as TOUCH_UL_X and 
TOUCH_UL_Y.
3. Prompt the user to touch the lower right corner of the video screen.
4. Save the coordinates returned as TOUCH_LR_X and 
TOUCH_LR_Y.
A good way to prompt the user to touch the corners is to draw a 
border around the edge of the screen and prompt the user to touch 
each point using a target in the respective corner and text centered 
on the screen.
5. Calculate the four calibration parameters as follows: 
OFFSET_X = TOUCH_UL_X
OFFSET_Y = TOUCH_UL_Y
SCALE_X = VIDEO_MAX_X / (TOUCH_LR_X -
TOUCH_UL_X)
SCALE_Y = VIDEO_MAX_Y / (TOUCH_LR_Y - 
TOUCH_UL_Y)
6. Save the four calibration parameters to a nonvolatile storage area, if 
available. If none is available, the calibration procedure must be 
followed each time the system is powered up.
The floating point calibration procedure is now complete. In your 
application program, convert the touch coordinates reported by the 
touch system into the equivalent video coordinates with these equations:
VIDEO_X = SCALE_X * (TOUCH_X - OFFSET_X)
VIDEO_Y = SCALE_Y * (TOUCH_Y - OFFSET_Y)










