Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

eGalax touchscreen calibration
Thank you for your donation

Pages (15): « Previous 1 ... 9 10 11 12 13 ... 15 Next »
Post Reply 
 
Thread Rating:
  • 5 Votes - 4.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
eGalax touchscreen calibration
9th Jul, 2013, 10:23 PM
Post: #151
Markamc Offline
Registered
Posts: 94
Joined: Apr 2013
Reputation: 4
RE: eGalax touchscreen calibration
(9th Jul, 2013 10:02 PM)bboyandru Wrote:  
(9th Jul, 2013 09:31 PM)Markamc Wrote:  Hi Andrei,

Nice one, I'll try it later.

How do you do the calibration, is it using a program?
It would be possible to script and inject gestures too in python at the event level, although I don't intend on doing it! (need life back!)

The reason I tried a different way was the click_confines was to small for my finger size on a 7" screen, can you change this externally, say in the calib file so I could alter the sensitivity of a touch? Saves me recompiling.

Brantje, I'm sure the calibration should'nt be off, I think the clue was the resolution of your pi, xres 1240. The 'lag' I noticed was probably due to the python error
Hi Mark!

I did my calibration in Xserver using xinput_calibrator program(you can see how I did this on my blog post at the calibration part). I am sure that this can be done as well with ts_calibrate. If you want to disable my calibration you just have to put the values from the calibration file like this:
calib_x_d=<your screen resolution width> e.g. calib_x_d=1280
calib_y_d=<your screen resolution height> e.g. calib_y_d=720
calib_x_fact=-1
calib_y_fact=-1
My projection is like this:
pointer.x = screen_width - value_read.x * calib_x_fact - calib_x_d;
pointer.y = screen_height - value_read.y * calib_y_fact - calib_y_d;
and the original code is like this:
pointer.x = value_read.x;
pointer.y = value_read.y;
I will modify the patches and add click_confines value to the calibration file this evening.

Andrei

Yep, I did it like this too , would be good to use ts_calibrate then you could call it from a xbmc plug-in, the values are easy to translate.

Your patch is also on xbian at the moment, but with the single-click disabled, I was using the calib files until I tried a different way.

I meant, I force touch events and BTN_right events outside XBMC with uimapper, if your patch is permanent then I would have conflicting events for uimapper and your hard-coded patch. Would be nice, for me anyway, to choose which way? by some a 'flag' in the calib file, maybe?
Find all posts by this user
Quote this message in a reply
9th Jul, 2013, 11:07 PM
Post: #152
bboyandru Offline
Registered
Posts: 11
Joined: Feb 2013
Reputation: 2
RE: eGalax touchscreen calibration
(9th Jul, 2013 10:23 PM)Markamc Wrote:  
(9th Jul, 2013 10:02 PM)bboyandru Wrote:  
(9th Jul, 2013 09:31 PM)Markamc Wrote:  Hi Andrei,

Nice one, I'll try it later.

How do you do the calibration, is it using a program?
It would be possible to script and inject gestures too in python at the event level, although I don't intend on doing it! (need life back!)

The reason I tried a different way was the click_confines was to small for my finger size on a 7" screen, can you change this externally, say in the calib file so I could alter the sensitivity of a touch? Saves me recompiling.

Brantje, I'm sure the calibration should'nt be off, I think the clue was the resolution of your pi, xres 1240. The 'lag' I noticed was probably due to the python error
Hi Mark!

I did my calibration in Xserver using xinput_calibrator program(you can see how I did this on my blog post at the calibration part). I am sure that this can be done as well with ts_calibrate. If you want to disable my calibration you just have to put the values from the calibration file like this:
calib_x_d=<your screen resolution width> e.g. calib_x_d=1280
calib_y_d=<your screen resolution height> e.g. calib_y_d=720
calib_x_fact=-1
calib_y_fact=-1
My projection is like this:
pointer.x = screen_width - value_read.x * calib_x_fact - calib_x_d;
pointer.y = screen_height - value_read.y * calib_y_fact - calib_y_d;
and the original code is like this:
pointer.x = value_read.x;
pointer.y = value_read.y;
I will modify the patches and add click_confines value to the calibration file this evening.

Andrei

Yep, I did it like this too , would be good to use ts_calibrate then you could call it from a xbmc plug-in, the values are easy to translate.

Your patch is also on xbian at the moment, but with the single-click disabled, I was using the calib files until I tried a different way.

I meant, I force touch events and BTN_right events outside XBMC with uimapper, if your patch is permanent then I would have conflicting events for uimapper and your hard-coded patch. Would be nice, for me anyway, to choose which way? by some a 'flag' in the calib file, maybe?

I don't think my patch will affect forcing other inputs using uimapper. My code just skips the first point received by XBMC and use it as the previous point for distance calculation. For example, at one touch on the touchscreen, XBMC gets more than 5 events, so ignoring the first one wouldn't be a problem.
Please have a look at my description from the blog post:
Quote:After I have successfully calibrated the touchscreen I have discovered that single click was not possible from the touchscreen, just double click. After digging through the code, I have found that this was caused by drag action which was triggered because the previous values of the touch were far(more than 5 pixels) from a new press. For example, at the start of the program, cursor is set at 0,0 coordinates; if user is trying to press a button, let's say at 100, 300, the program(XBMC) will calculate the distance between these two points and will find out that this is greater than 5.
Pythagorean theory:
(100-0)x(100-0) + (300 - 0)x(300-0) is greater than 5x5 so XBMC will treat this as a drag event.

This drag issue is not caused when you double click, because the previous point in the second click action is very close to the second click point. This also works for mouses, because the previous value of the pointer is always very close to the new value of the pointer(because mouse's pointer drags on the screen and it doesn't jump - so each new value is very close to the previous one).

Andrei
Visit this user's website Find all posts by this user
Quote this message in a reply
9th Jul, 2013, 11:57 PM
Post: #153
brantje Offline
Tester
Posts: 305
Joined: Dec 2012
Reputation: 32
RE: eGalax touchscreen calibration
Done: https://github.com/brantje/xbian-touch

Read the read me *duh* and follow instructions

This uses Markamc's method.

XBian Skin Beta Testing
Clock Screensaver

If you liked my help, click on "Thanks" to show your appreciation.
Find all posts by this user
Quote this message in a reply
10th Jul, 2013, 01:42 AM
Post: #154
Markamc Offline
Registered
Posts: 94
Joined: Apr 2013
Reputation: 4
RE: eGalax touchscreen calibration
Nice work, thanks Brantje for your help. It's good to see all this development on this forum and be part of it!

cheers

mark

(9th Jul, 2013 11:07 PM)bboyandru Wrote:  
(9th Jul, 2013 10:23 PM)Markamc Wrote:  
(9th Jul, 2013 10:02 PM)bboyandru Wrote:  
(9th Jul, 2013 09:31 PM)Markamc Wrote:  Hi Andrei,

Nice one, I'll try it later.

How do you do the calibration, is it using a program?
It would be possible to script and inject gestures too in python at the event level, although I don't intend on doing it! (need life back!)

The reason I tried a different way was the click_confines was to small for my finger size on a 7" screen, can you change this externally, say in the calib file so I could alter the sensitivity of a touch? Saves me recompiling.

Brantje, I'm sure the calibration should'nt be off, I think the clue was the resolution of your pi, xres 1240. The 'lag' I noticed was probably due to the python error
Hi Mark!

I did my calibration in Xserver using xinput_calibrator program(you can see how I did this on my blog post at the calibration part). I am sure that this can be done as well with ts_calibrate. If you want to disable my calibration you just have to put the values from the calibration file like this:
calib_x_d=<your screen resolution width> e.g. calib_x_d=1280
calib_y_d=<your screen resolution height> e.g. calib_y_d=720
calib_x_fact=-1
calib_y_fact=-1
My projection is like this:
pointer.x = screen_width - value_read.x * calib_x_fact - calib_x_d;
pointer.y = screen_height - value_read.y * calib_y_fact - calib_y_d;
and the original code is like this:
pointer.x = value_read.x;
pointer.y = value_read.y;
I will modify the patches and add click_confines value to the calibration file this evening.

Andrei

Yep, I did it like this too , would be good to use ts_calibrate then you could call it from a xbmc plug-in, the values are easy to translate.

Your patch is also on xbian at the moment, but with the single-click disabled, I was using the calib files until I tried a different way.

I meant, I force touch events and BTN_right events outside XBMC with uimapper, if your patch is permanent then I would have conflicting events for uimapper and your hard-coded patch. Would be nice, for me anyway, to choose which way? by some a 'flag' in the calib file, maybe?

I don't think my patch will affect forcing other inputs using uimapper. My code just skips the first point received by XBMC and use it as the previous point for distance calculation. For example, at one touch on the touchscreen, XBMC gets more than 5 events, so ignoring the first one wouldn't be a problem.
Please have a look at my description from the blog post:
Quote:After I have successfully calibrated the touchscreen I have discovered that single click was not possible from the touchscreen, just double click. After digging through the code, I have found that this was caused by drag action which was triggered because the previous values of the touch were far(more than 5 pixels) from a new press. For example, at the start of the program, cursor is set at 0,0 coordinates; if user is trying to press a button, let's say at 100, 300, the program(XBMC) will calculate the distance between these two points and will find out that this is greater than 5.
Pythagorean theory:
(100-0)x(100-0) + (300 - 0)x(300-0) is greater than 5x5 so XBMC will treat this as a drag event.

This drag issue is not caused when you double click, because the previous point in the second click action is very close to the second click point. This also works for mouses, because the previous value of the pointer is always very close to the new value of the pointer(because mouse's pointer drags on the screen and it doesn't jump - so each new value is very close to the previous one).

Andrei

Ok, Andrei, I understand completely , I've been using it for a while, I was just a bit worried that my forced events may affect your code too. If I stop uimapper, then i use your hard-coded calibration routine and calib-file. Uimapper does the translations at event level for a user-generated input-device using the /etc/pointercal file generated, after ts_calibrate is executed. ts_calibrate also uses a component of x and y in both x and y compensations to allow for linear mis-alignment of touchscreen, although I haven't implemented use yet, but you could very easily, in your code , if you wish.
Find all posts by this user
Quote this message in a reply
10th Jul, 2013, 06:03 AM
Post: #155
bboyandru Offline
Registered
Posts: 11
Joined: Feb 2013
Reputation: 2
RE: eGalax touchscreen calibration
Hi!

I have added click_confines to the calibration file and I have created a single patch for all fixes. I can confirm that a value of 8 for cick_confines makes the touch verry sensitive, although I have a film over the touch screen the touch behaves verry close to a capacitive one. I will make a video soon.
You can download the patch from here

Best Regards,
Andrei
Visit this user's website Find all posts by this user
Quote this message in a reply
12th Jul, 2013, 05:17 AM
Post: #156
brantje Offline
Tester
Posts: 305
Joined: Dec 2012
Reputation: 32
RE: eGalax touchscreen calibration
I spoke with Koenkk, and a patch for xbmc would be the best option.
Do we still have a right click then?


Updates xbian skin also abit more for touch
Also, if users wants mark's method then they should have an option to use it.

XBian Skin Beta Testing
Clock Screensaver

If you liked my help, click on "Thanks" to show your appreciation.
Find all posts by this user
Quote this message in a reply
13th Jul, 2013, 02:33 AM
Post: #157
bboyandru Offline
Registered
Posts: 11
Joined: Feb 2013
Reputation: 2
RE: eGalax touchscreen calibration
Hi!

Check out my new video with XBMC12.2 and my new skin(designed for use in cars), which is work in progress.

https://www.youtube.com/watch?v=d7uRCweGXP0

Best Regards,
Andrei
Visit this user's website Find all posts by this user
Quote this message in a reply
13th Jul, 2013, 03:05 AM
Post: #158
Markamc Offline
Registered
Posts: 94
Joined: Apr 2013
Reputation: 4
RE: eGalax touchscreen calibration
Good effort , really nice interface..

I'll give yours a try, have you got an img file to test (latest) or should I compile with patches? or is it in xbian yet?

cheers
mark
Find all posts by this user
Quote this message in a reply
13th Jul, 2013, 05:27 AM
Post: #159
bboyandru Offline
Registered
Posts: 11
Joined: Feb 2013
Reputation: 2
RE: eGalax touchscreen calibration
(13th Jul, 2013 03:05 AM)Markamc Wrote:  Good effort , really nice interface..

I'll give yours a try, have you got an img file to test (latest) or should I compile with patches? or is it in xbian yet?

cheers
mark

Hi

I have uploaded my image at https://drive.google.com/uc?id=0B__Rs5JF53-kU09ENm5aSm1kc1U&export=download

Andrei
Visit this user's website Find all posts by this user
Quote this message in a reply
13th Jul, 2013, 06:09 AM
Post: #160
Markamc Offline
Registered
Posts: 94
Joined: Apr 2013
Reputation: 4
RE: eGalax touchscreen calibration
Many thanks Andrei, i'll give it a go now and give some feedback

Been looking into swipe? looking for an event type to inject at kernel level...not sure at this stage whether possible for 12.2 maybe better suited to gotham. New to all this still

atb
mark
Find all posts by this user
Quote this message in a reply
13th Jul, 2013, 07:31 AM
Post: #161
Markamc Offline
Registered
Posts: 94
Joined: Apr 2013
Reputation: 4
RE: eGalax touchscreen calibration
Hi Andrei,

Interface looks good. I tried my old touchscreen_calib file and it didn't work, I check against yours and can see that you have changed the transformation equations. No problem I can set them right. I tried to install ts_calibrate to see if i could get the swap etc and some feedback once exiting from xbmc but the screen was black.

I think you have a good solution and if I can help you in anyway let me know.
I think it would be good if you use the tslib to generate your calib file, then it is more automatic, I can help you if you like, only by showing you how I managed

What I will try to do, this weekend is recompile your patches into XBMC (xbian) maybe? and see if I can get it to work, for me of course..or maybe Brantje could too.

Another idea I was looking at was Opengalax, the guy had a serial comms touchscreen and wrote a user-input driver, I couldn't convert it, but with your knowledge it would be a piece of cake
Find all posts by this user
Quote this message in a reply
28th Jul, 2013, 09:47 PM
Post: #162
raspuca Offline
Registered
Posts: 23
Joined: Apr 2013
Reputation: 0
RE: eGalax touchscreen calibration
HI all!! Are there any news about the project? There are a definitive patch or method?
brantje the skin is very good!! are there update about this?
Find all posts by this user
Quote this message in a reply
29th Jul, 2013, 10:27 PM
Post: #163
brantje Offline
Tester
Posts: 305
Joined: Dec 2012
Reputation: 32
RE: eGalax touchscreen calibration
(13th Jul, 2013 02:33 AM)bboyandru Wrote:  Hi!

Check out my new video with XBMC12.2 and my new skin(designed for use in cars), which is work in progress.

https://www.youtube.com/watch?v=d7uRCweGXP0

Best Regards,
Andrei
Can you put the skin on github?

(28th Jul, 2013 09:47 PM)raspuca Wrote:  HI all!! Are there any news about the project? There are a definitive patch or method?
brantje the skin is very good!! are there update about this?
The xbian skin?

XBian Skin Beta Testing
Clock Screensaver

If you liked my help, click on "Thanks" to show your appreciation.
Find all posts by this user
Quote this message in a reply
30th Jul, 2013, 12:20 AM
Post: #164
raspuca Offline
Registered
Posts: 23
Joined: Apr 2013
Reputation: 0
RE: eGalax touchscreen calibration
I talk about this Smile
http://puu.sh/3AsSY.jpg
Find all posts by this user
Quote this message in a reply
30th Jul, 2013, 02:48 AM
Post: #165
brantje Offline
Tester
Posts: 305
Joined: Dec 2012
Reputation: 32
RE: eGalax touchscreen calibration
That is the xbian skin =)

XBian Skin Beta Testing
Clock Screensaver

If you liked my help, click on "Thanks" to show your appreciation.
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Pages (15): « Previous 1 ... 9 10 11 12 13 ... 15 Next »
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  [PROBLEM] Touchscreen calibration is wrong and i'm going crazy. wash 5 19,817 17th Jan, 2015 10:34 PM
Last Post: wash
  Tutorial: Touchscreen calibration & extra features Markamc 0 7,559 2nd Jul, 2013 12:11 AM
Last Post: Markamc

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 21st May, 2025, 09:09 AM Powered By MyBB, © 2002-2025 MyBB Group.