Azzera filtri
Azzera filtri

Can Matlab read position of touch on multitouch screen ?

1 visualizzazione (ultimi 30 giorni)
Touch Screens (single touch) are mouse, so, reading mouse position we are able to read touch position, but what about multitouch ? There is a tools or piece of code to understand how to read multitouch position in screen using matlab code ? What about TUIO ?

Risposta accettata

Dimitris Iliou
Dimitris Iliou il 14 Ott 2016
If I understand correctly, you want to know if you can use any MATLAB code to read multi-touch on a touchscreen.
When you touch the screen at a specific point on a figure with a single finger, then the location of the mouse pointer is set to that point. You can retrieve that position by using the CurrentPoint property of the figure.
Multi-touch is a different workflow since you do not have a single pointer location. A caveat in multi-touch, like double finger tap, can be constrains by the OS or the hardware.
I have tried the following code on a touchscreen laptop in order to get an understanding how multi-touch would work.
function test
x = 0:pi/100:2*pi;
y = sin(x);
h = figure('WindowButtonDownFcn',@press); % opens new figure window
plot(x,y)
function press(hObject,Event)
disp('----')
hObject.CurrentPoint
The outcome of this exercise was that the OS (or the hardware) did not register the double finger tap on the screen and consequently, the CurrentPoint property did not register any change on the mouse pointer.
Having said this, I would suggest two things:
  1. If you have a system that registers double finger tap, try the code above and see if the output provides two set of coordinates.
  2. An alternative approach would be to look into Java functions that may register this functionality.

Più risposte (1)

Marco
Marco il 17 Ott 2016
Thank you Dimitris, It would be nice if someone can post some java instruction to handle multitouch screen in Matlab.

Categorie

Scopri di più su Stateflow Programmatic Interface in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by