isolver / OpenHandWrite

Python tools for the recording and analysis of handwriting captured via pen tablet type devices.
GNU General Public License v3.0
14 stars 4 forks source link

Show "pauses" (thresholded hover / out-of-range periods) in spatial view #166

Open Mark-Torrance opened 8 years ago

Mark-Torrance commented 8 years ago

This is provided (I think) by both Eye and Pen and HandSpy analysis programs. I guess for bottom-up research where you are generating initial hypotheses about where (and therefore why) writers pause, it's useful.

So you would get a mark in the spatial view (or selected view - but not both) indicating periods of hover and/or out-of-range over a user-specified duration. The mark in located at the sample immediately prior to the onset of this period. Optionally, the size of the mark (E&P and HandSpy both use circles, again I think) could be proportional to the duration of the pause.

For this to be properly useful I think you would need to be able to (a) toggle display of these from the toolbar and (b) change threshold during a session (i.e. without having to reopen the data). It would be good to be able to specify both just threshold minimums (show anything where duration > d) and ranges (d < duration < dd).

isolver commented 8 years ago

indicating periods of hover and/or out-of-range over a user-specified duration.

Duration criteria is clear. When determining that a 'hover' occurred within the specified duration, would it be defined by a user provided max position 'distance' threshold. What measure / stat from the sample positions would be best to use for 'distance' threshold comparison? i.e. std, max distance from mean or median position, other, ....?

Would be nice if the distance threshold measure used was not dependant on the pen position data values; so the same threshold value would work whether the position data was in pixels ( 0 - 1920 max) vs raw wacom position ( 0 - tens of thousands max ).

Mark-Torrance commented 8 years ago

It's simpler than that. We just find all periods of time ("pauses") ending with FIRST_PRESSED and starting with the last PRESSED prior to the FIRST_PRESSED, and xy for the PRESSED sample. Then identify just those pauses that are over a user-specified duration (or within a user-specified range) and then in the spatial view plot a circle at xy for each of these pauses, optionally with a radius proportional to the duration.

So what this is doing is taking the periods that are represented by combinations of greyed dots and gaps in the timeline and representing these as circles in the spatial view.

isolver commented 8 years ago

OK, so it is not reporting periods of 'stable' hovering, just any periods of hovering / out of bounds data that have some minimum combined duration. Do I get it now? ;)

Mark-Torrance commented 8 years ago

Yes, exactly.

The deluxe version would add in stable pen-press periods. So periods where pressure > 0 but x,y do not change by more than a threshold over N samples / milliseconds. However, we would need to explore whether this is actually useful (in fact, whether this actually happens), and avoid confounds with stroke boundaries. It's complicated. I think. We would not want to take 10 near-static samples at the bottom of a stroke as a "pause" but we might want to take 10 samples immediately prior to a hover as part of the just-starting pause (so the pen stops, the writer starts "thinking", they then lift the pen...)

The history to this is that the writing literature has a number of papers where researchers count these thresholded pauses. MarkWrite was originally (in my mind) intended to move away from pause based analyses. But they have their place...

Pauses in handwriting are always (as far as I can tell) defined just as "pen is off the paper".