dollarpy
dollarpy is a python implementation of the $P Point-Cloud Recognizer.
From the website:
The $P Point-Cloud Recognizer is a 2-D gesture recognizer designed for rapid prototyping of gesture-based user interfaces. In machine learning terms, $P is an instance-based nearest-neighbor classifier with a Euclidean scoring function, i.e., a geometric template matcher.
$P is the latest in the dollar family of recognizers that includes $1 for unistrokes and $N for multistrokes. Although about half of $P’s code is from $1, unlike both $1 and $N, $P does not represent gestures as ordered series of points (i.e., strokes), but as unordered point-clouds. By representing gestures as point-clouds, $P can handle both unistrokes and multistrokes equivalently and without the combinatoric overhead of $N. When comparing two point-clouds, $P solves the classic assignment problem between two bipartite graphs using an approximation of the Hungarian algorithm.
Vatavu, R. D., Anthony, L., & Wobbrock, J. O., “Gestures as Point Clouds: A $P Recognizer for User Interface Prototypes”, in: Proceedings of the 14th ACM International Conference on Multimodal Interaction (ICMI), Santa Monica, LA, USA, 2012, pp. 273-280.
Installation
dollarpy can be installed using pip:
pip install dollarpy
Usage
dollarpy is used in 3 steps:
from dollarpy import Recognizer, Template, Point
# Define 'Template' gestures, each consisting of a name and a list of 'Point' elements.
# These 'Point' elements have 'x' and 'y' coordinates and optionally the stroke index a point belongs to.
tmpl_1 = Template('X', [
Point(0, 0, 1),
Point(1, 1, 1),
Point(0, 1, 2),
Point(1, 0, 2)])
tmpl_2 = Template('line', [
Point(0, 0),
Point(1, 0)])
# Create a 'Recognizer' object and pass the created 'Template' objects as a list.
recognizer = Recognizer([tmpl_1, tmpl_2])
# Call 'recognize(...)' to match a list of 'Point' elements to the previously defined templates.
result = recognizer.recognize([
Point( 31, 141, 1),
Point(109, 222, 1),
Point( 22, 219, 2),
Point(113, 146, 2)])
print(result) # Output: ('X', 0.733770116545184)
Metadata
Release files for dollarpy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dollarpy-0.1.1.tar.gz | 4.1 kB | Without provenance | Details for dollarpy-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dollarpy-0.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for dollarpy-0.1.1-py2.py3-none-any.whl |
Total release size: 7.8 kB
Release files / dollarpy-0.1.1.tar.gz
| Download URL | dollarpy-0.1.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0df2333279f17bbb579f8c25bfd0105074fc3003a58881953576708513e0ca6
|
|
BLAKE2b-256 checksum How to use checksums |
9f58a0f8aea15c3d6aa277de148c5b67f5dbbbf77886148b2421c5e519ed4ad3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / dollarpy-0.1.1-py2.py3-none-any.whl
| Download URL | dollarpy-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
04332cf136d85a3e484fb9e137bb83cfee80966bfd63d4a8f71b4468f2a88cca
|
|
BLAKE2b-256 checksum How to use checksums |
5b8d2762164f51a524c35ce648493c1216e43669214ab529c66855ed097a8dc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dollarpy 0.1.1
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.