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
@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}
}
Metadata
Release files for TurboTouchPredictor 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| TurboTouchPredictor-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for TurboTouchPredictor-0.1.5-py3-none-any.whl |
Release files / TurboTouchPredictor-0.1.5-py3-none-any.whl
| Download URL | TurboTouchPredictor-0.1.5-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b73f12c7b1f330a6b21017233f066e08421f23487ca3106a6a0a77340fc56a17
|
|
BLAKE2b-256 checksum How to use checksums |
01d0f5d2e6510fed6631b5f321c0cb7bf91f9faae59aa8ad7ab8fe73d058e35a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.1
|
Security for TurboTouchPredictor 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.