0

I'm writing a signature software (you sign through a tablet and it processes you signature). I have for each point pressed by the pen its position (.getx() and .gety()) and its timestamp (.getTime()). How can i calculate an appropriate "signing speed"? Witch kind of formula should I use? It is enough to do distance/time (amount of lines written between the points/ time to write them)? Or should I find the vectorial average speed?

Thanks to all who wants to help

4

1 回答 1

0

建议找出纽约市的总距离并除以经过的时间。

假设您有很多积分

伪代码

distance = 0
for each point after the first
  distance += abs(point(i).x - point(i-1).x) + abs(point(i).y - point(i-1).y)
speed = distance/(endtime - starttime)

我喜欢 NYC 距离与 sqrt(deltaX*deltaX + deltaY*deltaY)。是计算速度更快,并不是所有相对不同 - 恕我直言

于 2013-05-25T04:15:04.693 回答