Hello,
The last message was with errors and type mismatch.
This is corrected here. Sorry.
I have made 3 tests for calibration of the touchscreen. All are made "with the
hands (and maxima)".
The first is the one of tslib :
xcal = ((x * 91) >> 8) - 61 - ((207 *y) >> 16);
ycal = 509 - ((y * 142) >> 8) - ((x * 13) >> 8);
that is
ycal = ax + by + c
ycal = dx + ey + f
The second one is a generalisation :
xcal = ((x * 91) >> 8) - 61;
ycal = 548 - ((y * 160) >> 8) - ((x * 31) >> 8) + ((((x * 8) >> 8)* y) >> 8);
that is, a gxy term is added for ycal.
With this two there are problems with the y values. The x values are good. The
second one is better near the corners (this is useful).
The third is adapted from the perspective transform of gimp :
xcal = ((104 * x) - (2 * y) - (68 * 256)) / (((15 * x) >> 8) - ((2 * y) >> 8) +
245);
ycal = (- (4 * x) - (152 * y) + (523 * 256)) / (((15 * x) >> 8) - ((2 * y) >> 8)
+ 245);
it is harder to compute the constants, but the results are interesting.
I have NOT taken time on tweaking the constants. The biggest problem is near the
bottom border (in the middle the pen is to high but good on the corner), perhaps the
touchscreen is not linear.
The problem with the tslib technic seems to be the border.
Moreover I succeed (with pain) in adding a contact with the palm-style keyboard.
There is a lot of jitter and I would be good to suppress the first and last "pen
down" event
since there value are not relevant. But I do not know how to make that.
sincerely,
Alain
Received on Fri Apr 16 2004 - 12:05:31 EDT
This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:19:27 EDT