It starts with pixels

Archive for the ‘multi-touch’ tag

Composing 2D Similarity Transforms

without comments

Similarity transforms come up often in computer vision and gestural interfaces.  The results below are a straightforward application of definitions, but didn’t come up in a quick web search, so I though they may be useful to document here on the blog.

In 3×3 matrix form, a similarity transform parameterized by a scale, rotation, and translation is represented as:

[s*cos(th)  -s*sin(th)   tx ]
[s*sin(th)   s*cos(th)   ty ]
[    0           0       1  ]
Say you have two similarities, T1 and T2, with their parameters as follows:
  • scale: s1,s2
  • rotation: th1,th2
  • translation: (dx1 dy1), (dx2 dy2)
You can represent the composition of T1 and T2 as a third similarity (T3) transform with the same parameterization.
  • In matrix form, T3 = T2*T1.
It is perhaps more useful in parameter space, where the result is:
  • th3 = th1 + th2
  • s3 = s1*s2
  • dx3 = s2(cos(th2)*dx1 – sin(th2)*dy1) + dx2
  • dy3 = s2(sin(th2)*dx1 + cos(th2)*dy1) + dy2

Written by jeff

December 22nd, 2008 at 9:15 pm

Posted in iphone

Tagged with ,

Android G1 hardware DOES support multi-touch

without comments

There has been a lot of uneducated speculation about whether the Android G1 could support multi-touch.  I just came across this post by a smart guy who recompiled the synaptics touchscreen driver and got it to track two fingers. Bravo!

No stupid YouTube video like previous attempts at proving this, just some clean console output (trimmed):


x  688, y 3921, z  17, w  1, F 0, 2nd: x    0, y    0, z  17, w  1,
x  696, y 3892, z  21, w  1, F 0, 2nd: x    0, y    0, z  21, w  1,
x  700, y 3887, z  24, w 13, F 0, 2nd: x    0, y    0, z  24, w 13,
x  700, y 3868, z  53, w  7, F 2, 2nd: x 2859, y 1168, z  53, w  7,
x  697, y 3867, z  61, w  6, F 2, 2nd: x 2863, y 1162, z  61, w  6,
x  692, y 3864, z  64, w  7, F 2, 2nd: x 2863, y 1166, z  64, w  7,
x  683, y 3860, z  67, w 10, F 2, 2nd: x 2867, y 1170, z  67, w 10,
x  677, y 3857, z  68, w 11, F 2, 2nd: x 2867, y 1170, z  68, w 11,

Written by jeff

November 17th, 2008 at 2:54 am

Posted in android

Tagged with , ,