Chapter 3 - General Programming Issues
CARROLL TOUCH
3-8
Touch System Programmer’s Guide
You may also want to limit VIDEO_X and VIDEO_Y to the ranges
defined by VIDEO_MAX_X and VIDEO_MAX_Y. It is recommended
that the touch coordinates be converted to video coordinates
immediately upon their receipt from the touch system, and that video
coordinates be used in the remainder of the application program.
Floating Point Calibration Examples
If the coordinates resulting from calibration of a system with 640 x 480
resolution are:
TOUCH_UL_X
= 10
TOUCH_UL_Y
= 7
TOUCH_LR_X
= 150
TOUCH_LR_Y
= 110
and the system has a resolution of 640 x 480:
VIDEO_MAX_X
= 639
VIDEO_MAX_Y
= 479
the four calculated calibration parameters are:
OFFSET_X
= 10
OFFSET_Y
= 7
SCALE_X
= 639 / (150 - 10) =
4.5643
SCALE_Y
= 479 / (110 - 7) =
4.65
Following are three examples of how to solve for different values of
VIDEO_X and VIDEO_Y:
If TOUCH_X = 7 and TOUCH_Y
= 10, then:
VIDEO_X = 4.5643 * (10 - 10) = 0
VIDEO_Y = 4.65 * (7 - 7)
= 0
If TOUCH_X = 60, and TOUCH_Y= 80, then:
VIDEO_X = 4.5643 * (60 - 10) = 228
VIDEO_Y = 4.65 * (80 - 7)
= 339
If TOUCH_X = 150, and TOUCH_Y= 110, then:
VIDEO_X = 4.5643 * (150 - 10) = 639
VIDEO_Y = 4.65 * (110 - 7)
= 479
Summary of Contents for TouchSystems CarrollTouch Prog
Page 1: ...CARROLL TOUCH TOUCH PRODUCTS an company AMP Touch System Programmer s Guide ...
Page 11: ...Table of Contents CARROLL TOUCH viii ...
Page 13: ...Table of Contents CARROLL TOUCH x ...
Page 17: ...Welcome CARROLL TOUCH xiv Touch System Programmer s Guide ...
Page 41: ...Chapter 3 General Programming Issues CARROLL TOUCH 3 12 Touch System Programmer s Guide ...
Page 57: ...Chapter 4 Smart Frame Protocol CARROLL TOUCH 4 16 Touch System Programmer s Guide ...
Page 237: ...Appendix D CTKERN Function Reference CARROLL TOUCH D 42 Touch System Programmer s Guide ...