Modules and methods for calculating bag-of-features representations for online-handwritten trajectories.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Online Handwriting Tools

Python library and tool for calculating bag-of-features representations for online-handwritten trajectories. This project was designed to work with the Online-Handwritten George Washington Dataset. See there for more information about the expected trajectory file format.

Run ./ for basic usage and ./ exampledata/company_traj.txt out.txt -n -b exampledata/clusters.txt for calculating a bof representation of the normalized example trajectory.

As of now, the following parameters of the processing pipeline can only be changed in code (see

  • normalization steps (see traj/ for documentation)
  • online-handwritten features (see traj/ for documentation)
  • configuration of the spatial pyramid (see traj/spatialpyramid for documentation)

The tool's output is written in numpy-text format and is either a sequence of feature vectors (one for each point of the given trajectory, one vector per line) or a bag-of-features representation of the trajectory (one bin-value per line).


  • numpy
  • scipy


  • traj/ contains the online-handwritten trajectory library
  • exampledata/ contains an exemplary online-handwritten trajectory (company_traj.txt) as well as some pre-calculated clusters (clusters.txt)


  • support for different choices of normalization steps and features
  • ? supporting batch calculations for multiple trajectories ?


Apache License, Version 2.0