

#include <nitro/prc.h>
BOOL PRC_InitInputPattern(
PRCInputPattern* pattern,
void* buffer,
const PRCStrokes* strokes,
int maxPointCount,
int maxStrokeCount );
BOOL PRC_InitInputPatternEx(
PRCInputPattern* pattern,
void* buffer,
const PRCStrokes* strokes,
int maxPointCount,
int maxStrokeCount,
const PRCInputPatternParam* param );
pattern |
Pointer to the input pattern structure to be created. |
buffer |
Pointer to the memory area that will be used inside pattern. |
strokes |
Raw input stroke data. |
maxPointCount |
Maximum point count after processing. |
maxStrokeCount |
Maximum stroke count after processing. |
param |
Other parameter values that are dependent on the recognition algorithm (use NULL as the default). |
Returns TRUE if input pattern data is created successfully.
Converts raw input stroke data into the input pattern data in thePRCInputPattern type that is used for recognition. First, it normalizes and resamples the input stroke data according to the settings specified in param. Resampling will reduce the number of points in the stroke. Based on these points, this function pre-calculates the length, angles, bounding box, and other values used in recognition, and stores them as input pattern data.
The buffer argument specifies the memory region used internally by inputPattern. Use the PRC_GetInputPatternBufferSize function to get the amount of memory required, and then allocate at least that amount. Do not free buffer while inputPattern is in use.
The maxPointCount and maxStrokeCount arguments determine the maximum numbers of points and strokes, respectively. Resampling will greatly reduce the number of targeted points. This will apply the restrictions specified by maxPointCount and maxStrokeCount to the results of that process and store the results in inputPattern.
For details on normalizing and resampling, see PRCInputPatternParam.
PRC_InitInputPattern is equivalent to calling PRC_InitInputPatternEx with param set to NULL.
PRC_GetInputPatternBufferSize
PRC_GetInputPatternBufferSizeEx
PRCInputPatternParam
PRC_GetRecognizedEntry*
PRC_ResampleStrokes*
2005/03/04 Changed return value to BOOL.
2004/06/23 Initial version.
CONFIDENTIAL