Filters.mesa
Maureen Stone May 15, 1984 3:00:18 pm PDT
DIRECTORY
Seq;
Filters: CEDAR DEFINITIONS = {
The inteface for filters is a sequence of samples, corners and a closed flag. Points should never be duplicated to close a curve. Sample sequences should be checked NIL before calling these routines (corners may be NIL).
AveFilter: PROC[samples: Seq.ComplexSequence, closed: BOOLEAN] RETURNS [Seq.ComplexSequence];
AveFilterLeavingCorners: PROC[samples: Seq.ComplexSequence, closed: BOOLEAN, corners: Seq.NatSequence ← NIL] RETURNS [Seq.ComplexSequence];
the corners are a sequence of sample indices. Any sample marked as a corner will not be moved
Dynfilter: PROCEDURE[samples: Seq.ComplexSequence, closed: BOOLEAN, tolerance: REAL] RETURNS [new: Seq.ComplexSequence, totalBadness: REAL];
treats all samples as open. Uses dynamic programming to find a sequence of straight lines within the tolerence
}.