# Ticket #116 (closed enhancement: fixed)

## Add Dr. Inman's smoothing procedure to FreeformTool

Reported by: | sorber | Owned by: | sorber |
---|---|---|---|

Priority: | major | Milestone: | |

Component: | visbio | Severity: | |

Keywords: | overlays | Cc: | |

Blocked By: | Blocking: |

### Description

In a 1981 paper, Littlewood and Inman describe the algorithm used to measure the length of coordinate streams generated by their measuring machine. Their algorithm modifies the coordinate stream in two ways.

- It uses a "jitter test" to reject coordinates at least 0.05cm distant from the most recently accepted coordinates.
- It uses a "single exponential smoothing" procedure. Each incoming coordinate is transformed into a smoothed coordinate using the formula C
_{n}= S * U_{n}+ (1 - S) * C_{n-1}, where U_{n}is the unsmoothed coordinate, C_{n}the smoothed coordinate, C_{n-1}is the previous smoothed coordinate, and S is the smoothing factor (between 0 and 1, usually 0.35). According to Littlewood and Inman, this "tends to dampen the 'stair-step' effect".

Currently FreeformTool incorporates a jitter test based on a distance threshold of two pixels. This corresponds roughly to a distance of 0.053cm (left to right) and 0.61cm (top to bottom) on the Dell WFP2007 monitor and about 0.054cm (left to right and top to bottom) on the Wacom Cintiq 21 UX. Implementing the smoothing routine will be very easy to do.

## Change History

**Note:**See TracTickets for help on using tickets.

Implemented in FreeformTool.