recognizeUnistroke<K extends DefaultUnistrokeNames> function
Recognizes a unistroke from inputPoints
.
If useProtractor
is true, the Protractor algorithm is used.
Otherwise, the Golden Section Search algorithm is used.
The Protractor algorithm is the newer algorithm and is faster.
Returns null if no unistroke could be recognized, otherwise returns a RecognizedUnistroke with the recognized unistroke name and the score.
You can set referenceUnistrokes to a list of your own unistroke templates
if you want to recognize a different set of unistrokes.
Alternatively, you can set overrideReferenceUnistrokes
to override
referenceUnistrokes for this call only.
If you change referenceUnistrokes or overrideReferenceUnistrokes
,
you should call recognizeCustomUnistroke instead of this function.
Implementation
RecognizedUnistroke? recognizeUnistroke<K extends DefaultUnistrokeNames>(
List<Offset> inputPoints, {
bool useProtractor = true,
List<Unistroke<K>>? overrideReferenceUnistrokes,
}) {
return recognizeCustomUnistroke<K>(
inputPoints,
useProtractor: useProtractor,
overrideReferenceUnistrokes: overrideReferenceUnistrokes,
);
}