calibrate touchscreen

Peter Hutterer peter.hutterer at who-t.net
Wed Nov 16 23:58:26 UTC 2016


On Wed, Nov 16, 2016 at 04:41:55PM +0100, Jens Harms wrote:
> Hello, i created a simple calibration widget to calculate the CTM but
> xinput refused to apply the CTM.
> When i start X without any X Application running  and then (over ssh shell)
> type
> 
> xinput set-prop 'my touch' 'Coordinate Transformation Matrix' a b c d e f g
> h i
> 
> without any error, NOTHING happens. no error, no change to the property.
> 
> BUT: when I start X, then aterm and after the aterm window is visible,
> i can succesfully apply the matrix with  "xinput set-prop 'my touch'
> 'Coordinate Transformation Matrix' a b c d e f g h i"
> 
> Is this intended behavior?

probably. By default the X server resets after the last client disconnects
and starts with a vanilla state. Try the -noreset flag to Xorg, or keep one
client connected enough until the rest of the desktop starts.

Cheers,
   Peter

> 
> re,
> Jens Harms
> 
> For the curious, i uploaded the full source:
> 
> git clone https://github.com/xtforever/xtcal.git
> 
> you can add as many calibration points as you wish, the least sqare
> algo will calculate the correct matrix.
> 
> 
> 2016-10-20 7:52 GMT+02:00 Peter Hutterer <peter.hutterer at who-t.net>:
> 
> > On Wed, Oct 19, 2016 at 03:52:56PM +0200, Jens Harms wrote:
> > > Hi. I try to calibrate  a resisitive Touchscreen.
> > > The touchscreen is a bit rotatated (3-5 degree), therefore i can not use
> > > xinput_calibrator. I try to understand how the the evdev driver works.
> > >
> > > Do i need to set "Evdev Axis Calibration" and "Coordinate Transformation
> > > Matrix" ? Or is it sufficent to set the CTM alone?
> >
> > don't use the axis calibration, use the matrix only.
> >
> > > How are Touch coordinates calculated? Which transformations are applied
> > to
> > > the raw data?
> >
> > the matrix is a basic transformation matrix, so you can use your normal
> > rotational elements, etc. The values are normalized to [0, 1] where 1
> > represents "total width" or "total height".
> >
> > https://wiki.archlinux.org/index.php/Calibrating_Touchscreen
> > https://wiki.ubuntu.com/X/InputCoordinateTransformation
> >
> > Cheers,
> >    Peter
> >

> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel



More information about the xorg-devel mailing list