Skip to main content

TurboTouch predictor

Project description

NPM Version npm downloads

TurboTouch predictor Python version

Provides a Python implementation for the TurboTouch predictor.

Install

pip install TurboTouchPredictor --upgrade

Minimal example

from TurboTouchPredictor import TurboTouchPredictor

ttpPredictor = TurboTouchPredictor();

// Amount of prediction in ms. Allowed values: 0, 16, 32, 48, 64
ttpPredictor.setAmountOfCompensation(32);

predictedPoint = ttpPredictor.predict(0, 0, 0, "Interacting") # x, y, t, state

Doc

TurboTouchPredictor package

_class _TurboTouchPredictor.TurboTouchPredictor

Bases: object

Filter:

OneEuroVectorProcessor

LatencyCompensated:

int

Update1euroInternalFreq:

bool

__init__() None

Initializes the TurboTouchPredictor

predict(_x: float_, _y: float_, _timestamp: float_, _state: str_) tuple[float, float]

Predicts a point from the current lagging one

Parameters:
  • x – x coordinate in pixels

  • y – y coordinate in pixels

  • timestamp – timestamp in nanoseconds

  • state – “Interacting” or “NotInteracting”

Returns:

return the predicted point p, p[0]: x coordinate, p[1]: y coordinate

Return type:

tuple[float, float]

reset()

Resets the internal state of the processor

setAmountOfCompensation(_comp: int_) None

Sets the parameters of the predictor for the given amount of compensation

Parameters:

comp (int) – Compensation amount in ms. Allowed values: 0, 16, 32, 48, 64

_class _OneEuroVectorProcessor.OneEuroVectorProcessor(_freq: float_, _mincutoff: float_, _beta: float_)>

Bases: object

NormFilter:

OneEuroFilter

FilterX:

OneEuroFilter

FilterY:

OneEuroFilter

__init__(_freq: float, mincutoff: float, beta: float) None

Initializes the OneEuroVectorProcessor with three OneEuroFilter

Parameters:
  • freq (float) – An estimate of the frequency in Hz of the signal (> 0).

  • mincutoff (float) – Min cutoff frequency in Hz (> 0).

  • beta (float) – Parameter to reduce latency (> 0).

process(prediction: tuple[float, float, float], lag: tuple[float, float]) tuple[float, float]
Parameters:
  • prediction (tuple[float, float, float]) – (x, y, t)

  • lag (tuple[float, float]) – (x, y)

Returns:

the processed position

Return type:

tuple[float, float]

reset() None

Resets the internal state of the processor

setParameters(freq: float, mincutoff: float, beta: float) None
Parameters:
  • freq (float) – An estimate of the frequency in Hz of the signal (> 0).

  • mincutoff (float) – Min cutoff frequency in Hz (> 0).

  • beta (float) – Parameter to reduce latency (> 0).

Related publication

DOI

@inproceedings{10.1145/3242587.3242646,
    author = {Nancel, Mathieu and Aranovskiy, Stanislav and Ushirobira, Rosane and Efimov, Denis and Poulmane, Sebastien and Roussel, Nicolas and Casiez, G\'{e}ry},
    title = {Next-Point Prediction for Direct Touch Using Finite-Time Derivative Estimation},
    year = {2018},
    isbn = {9781450359481},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    url = {https://doi.org/10.1145/3242587.3242646},
    doi = {10.1145/3242587.3242646},
    abstract = {End-to-end latency in interactive systems is detrimental to performance and usability, and comes from a combination of hardware and software delays. While these delays are steadily addressed by hardware and software improvements, it is at a decelerating pace. In parallel, short-term input prediction has shown promising results in recent years, in both research and industry, as an addition to these efforts. We describe a new prediction algorithm for direct touch devices based on (i) a state-of-the-art finite-time derivative estimator, (ii) a smoothing mechanism based on input speed, and (iii) a post-filtering of the prediction in two steps. Using both a pre-existing dataset of touch input as benchmark, and subjective data from a new user study, we show that this new predictor outperforms the predictors currently available in the literature and industry, based on metrics that model user-defined negative side-effects caused by input prediction. In particular, we show that our predictor can predict up to 2 or 3 times further than existing techniques with minimal negative side-effects.},
    booktitle = {Proceedings of the 31st Annual ACM Symposium on User Interface Software and Technology},
    pages = {793–807},
    numpages = {15},
    keywords = {touch input, latency, lag, prediction technique},
    location = {Berlin, Germany},
    series = {UIST '18}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

TurboTouchPredictor-0.1.5-py3-none-any.whl (11.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page