reinderien / xcalibrate

X.org touchscreen calibrator
MIT License
51 stars 18 forks source link

Support zero-rotation calibration mode #1

Closed sebt3 closed 7 years ago

sebt3 commented 7 years ago

After going throw a calibration, I'm getting this matrix :

[[ 1.00832747  0.00147592  0.00200142]
 [-0.00948746  1.07224099 -0.0239955 ]
 [ 0.          0.          1.        ]]

But for a translation matrix shouldn't 0.00147592 and -0.00948746 be 0 instead ? This one look like a product of a translation and a rotation matrix (as y are part of the calculations of the x coordinate and the other way around)

Maybe I'm missing something obvious

reinderien commented 7 years ago

The next feature I had in mind was to specifically address this. Most peoples' touchpads are not actually rotated, so I intend on offering a "force-no-rotation" calibration mode that performs a different calculation and will by definition set these elements to zero.

reinderien commented 7 years ago

@sebt3 , please try the script in this branch: https://github.com/reinderien/xcal/blob/norot/xcal

in both rotation and rotation-disabled modes, and report the results. (I don't have a touchscreen right now.)

Thank you.

sebt3 commented 7 years ago

Ok both mode kinda works. With rotation disabled I'm getting this matrix which is indeed better :

[[ 1.0053686   0.          0.0053665 ]
 [ 0.          1.07133681 -0.02041673]
 [ 0.          0.          1.        ]]

Yet I'm still not able to reach the corners :(

Ho between calibrations, I'm reseting the values to the default with : xinput set-prop "TSC2007 Touchscreen" "libinput Calibration Matrix" 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0

sebt3 commented 7 years ago

on a side note, I'm working on a xinput_calibrator (https://github.com/sebt3/xinput_calibrator) version on my side, and my resulting matrix isnt any better than yours ;)

reinderien commented 7 years ago

OK. In the meantime, I'd be curious to learn more about your issue - perhaps we could discuss at https://gitter.im/reinderien_xcal/Lobby#

sebt3 commented 7 years ago

okay :( I wanted to help and would have publicised your work as it has values compared to mine