#include <nitro/prc.h>
typedef enum PRCResampleMethod
{
PRC_RESAMPLE_METHOD_NONE = 0,
PRC_RESAMPLE_METHOD_DISTANCE,
PRC_RESAMPLE_METHOD_ANGLE,
PRC_RESAMPLE_METHOD_RECURSIVE,
} PRCResampleMethod;
| PRC_RESAMPLE_METHOD_NONE | No resampling. |
| PRC_RESAMPLE_METHOD_DISTANCE | Use the next point if the city block distance exceeds the threshold. |
| PRC_RESAMPLE_METHOD_ANGLE | If the angle differs from the line previously used by at least threshold, the next point will be used. The angle is in units of 2π/65536 radians. |
| PRC_RESAMPLE_METHOD_RECURSIVE | Recursively processes so the points are used that cause all of the points before resampling to be distant from the line segments after resampling by no more than threshold. |
This enumerated type is contained in PRCInputPatternParam in the PRC_InitInputPatternEx function.
If raw input strokes are used as-is, there will be too many points, and an unsteady hand will cause much additional noise. Therefore a resampling process that keeps only the characteristic points is required. This enumerated type is for specifying the algorithm that is used to resample.
threshold, it uses the next point. Additionally it always uses each final image point. It does not use normal Euclidean distances, but instead uses city block distance (logical sum of the x coordinate difference and the y coordinate difference).FX_Atan2Idx to calculate the angle at each input point. Therefore the threshold is expressed using a u16 range for a complete circle (for example, a right angle is 16384). Processing speed is in the mid range.threshold, it uses the point. If the distance is less, it discards the point. If point C is used, it then creates two new pairs of A and B points from the A-C pair and the C-B pair. It then recursively repeats the above process.For details on resampling algorithms see docs/TechnicalNotes/PatternRecognition.pdf.
PRCInputPatternParam, PRC_InitInputPattern*, PRC_ResampleStrokes*
02/18/2005 Revised file name of reference document.
06/23/2004 Initial Version.
CONFIDENTIAL