On Sat, 17 Apr 2004 16:38:25 +0200
Alain2210 <alain2210_at_free.fr> wrote:
> > but now I see that at least h22xx doesn't. I don't know yet how a general
> > transform equation should look like, but it will have to be more complex
> > than just multiplying an 1x2 vector by a 2x2 matrix.
> So I have tested another transformation to get a "linear" touchscreen. The
> result is better but the constants still not optimal.
The problem is that you try to describe an arbitrary curve with a
second-order polynom. This is simply impossible, thus I doubt you will be able
to get suitable results this way.
Here's what I have thought today: either we come with a general case polynom
that fits all touchscreens in existance (and I've heard of large touchscreens,
covering 17" displays, that use matrix-like calibration, because they have
a non-linear response), or write a separate linearization plugin for tslib
that works specifically with h22xx touchscreen.
Lets' try first to think of a general case linearization algorithm. In the
general case, if we translate the whole screen rectangle into touchscreen
coordinate space, we get a irregularily shaped figure with four vertices
connected by splines, like in the PDF made by Alain.
WinCE seems to 'cheat' with its 5-point calibration, otherwise it couldn't
compensate for the curve lower border as shown on Alain's picture. I think it
already contains a generic model of h22xx's touchscreen space, it just needs
the scaling and translation coefficients.
I think the calibration program should support two levels of calibration,
fine-grain and rough calibration. In the fine-grain mode, it would ask for the
calibration matrix resolution, for 22xx I think a 5x3 matrix (5 horizontally,
3 vertically) would be enough. But this have to be done only once (on iPAQ
22xx model) (usually by developers), to get a general idea about the shape of
the touchscreen space. The rough 4- or 5-point calibration (what a user
typically does) would just compute the coefficients to translate from the
space of this exact hardware model to the touchscreen space of the model with
which the fine-grain calibration was done.
The actual linearization could use Catmull-Rom splines to connect the points.
I think using linear equations for this would result in worse results (and
thus would need a larger fine-grain matrix resoltion to get the same results).
-- Greetings, AndrewReceived on Sat Apr 17 2004 - 16:12:56 EDT
This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:19:27 EDT