LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-23-2017, 02:28 PM   #1
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Translating Evdev Axis Calibration to Matrix or something else?


I've upgraded from Debian 8 to Debian 9, and they've gotten rid of evdev. I had been using evdev to calibrate the resistive touch screen on one of my weirder computers (actually a Fujitsu ScanSnap N1800 kiosk scanner).

Here's what I used to use to calibrate it:

Code:
xinput set-prop "Fujitsu Takamisawa USB Touch Panel" "Evdev Axis Calibration" 850 16083 1000 15853
But if I list the available properties now, obviously evdev properties no longer show up:

Code:
xinput list-props "Fujitsu Takamisawa USB Touch Panel"
Device 'Fujitsu Takamisawa USB Touch Panel':
	Device Enabled (153):	1
	Coordinate Transformation Matrix (155):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Calibration Matrix (518):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Calibration Matrix Default (519):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Natural Scrolling Enabled (520):	0
	libinput Natural Scrolling Enabled Default (521):	0
	libinput Send Events Modes Available (273):	1, 0
	libinput Send Events Mode Enabled (274):	0, 0
	libinput Send Events Mode Enabled Default (275):	0, 0
	libinput Left Handed Enabled (522):	0
	libinput Left Handed Enabled Default (523):	0
	libinput Scroll Methods Available (524):	0, 0, 1
	libinput Scroll Method Enabled (525):	0, 0, 1
	libinput Scroll Method Enabled Default (526):	0, 0, 1
	libinput Button Scrolling Button (527):	2
	libinput Button Scrolling Button Default (528):	2
	libinput Middle Emulation Enabled (529):	0
	libinput Middle Emulation Enabled Default (530):	0
	Device Node (276):	"/dev/input/event3"
	Device Product ID (277):	1072, 1281
	libinput Drag Lock Buttons (531):	<no items>
	libinput Horizontal Scroll Enabled (532):	1
I don't see any property which looks similar to the one I originally used, but I do see "libinput Calibration Matrix (518)".

Am I right in thinking I'm going to have to somehow translate my evdev corner calibration coordinates into a transformation matrix? Any idea how to do this other than trial and error? Thanks!
 
Old 06-28-2017, 10:07 AM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546

Original Poster
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
I ended up just biting the bullet and redoing the calibration from scratch using "libinput Calibration Matrix".

I didn't want to get into the complexities of rotation and skewing, so I just did scaling and translation. This meant modifying four of the 9 matrix entries:

Code:
A 0 C
0 E F
0 0 1
The default identity matrix looks like this:

Code:
1 0 0
0 1 0
0 0 1
This means no calibration at all. The corresponding command line for this default looks like this:

Code:
xinput set-prop "Fujitsu Takamisawa USB Touch Panel" "libinput Calibration Matrix" 1 0 0   0 1 0   0 0 1
The factors A and C determine x-axis scaling and translation.

The factors E and F determine y-axis scaling and translation.

I just used trial and error to dial in the calibration until I was satisfied. The resulting command I ended up with was this:

Code:
xinput set-prop "Fujitsu Takamisawa USB Touch Panel" "libinput Calibration Matrix" 1.07 0 -.05   0 1.09 -.07   0 0 1
I stuck it in a script set to automatically run (in XFCE4 settings, it's Sessions and Startup).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU axis perpendicular to the MB vs CPU axis parallel to the MB. stf92 General 21 06-22-2011 11:39 AM
[SOLVED] Parallel matrix - matrix multiplication seg-faults ejspeiro Programming 9 04-18-2011 09:41 PM
is there a matrix screensaver, very exactly like in the Matrix movie? frenchn00b Linux - Desktop 2 08-20-2009 10:00 AM
awk convert column matrix to square matrix? johnpaulodonnell Programming 4 04-30-2008 01:45 PM
HP Calibration don_dimo Linux - General 0 08-06-2004 10:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration