How to get handwriting trajectory
data into Matlab
I use a WACOM digitisation tablet to get data into Matlab. Here is a modified demo
program that saves the raw data as a .csv file, and here are some Matlab
scripts to read such a file (run tabletscript.m). This is another script that must
also be
downloaded.
How to infer the hidden state distribution of an fHMM
Inference of the fHMM can be a slow process. Matlab can be quite slow
at looping over all the time indices, and so a MEX file coded in C++
was made to infer the hidden state distribution. That can be
downloaded here:
Source:
fhmm_estep.cpp
CMat.h
Copy both these files into your working Matlab directory, then type "mex fhmm_estep.cpp". If MEX is set up correctly, this will compile the code for use as a Matlab function.
Windows precompiled:
fhmm_estep.dll
If MEX doesn't work, here is a pre-compiled MS Windows file.
Quite brief help file:
fhmm_estep.m
Copy this into the same working directory so that "help fhmm_estep" will work.
A demo script for the MEX file, showing what the parameters are, and how well this inference can recover the
original hidden states giving rise to a generated sample:
fhmm_demo.m
The transition parameter matrix can be modified (before normalisation) to produce different system dynamics.
Quite a lot of explanation of the workings of the algorithm, and the parameter definitions can be found in my thesis.
For any further help, or comments, please feel free to email me. (ben.williams "at" ed.ac.uk)