1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>PRC_InitPrototypeDB*</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">PRC_InitPrototypeDB* <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1> 15<H2>Syntax</H2> 16<dl> 17 <dd><PRE><CODE>#include <nitro/prc.h> 18 19BOOL PRC_InitPrototypeDB( 20 <A href="PRCPrototypeDB.html">PRCPrototypeDB</A>* protoDB, 21 void* buffer, 22 const <A href="PRCPrototypeList.html">PRCPrototypeList</A>* prototypeList ); 23 24BOOL PRC_InitPrototypeDBEx( 25 <A href="PRCPrototypeDB.html">PRCPrototypeDB</A>* protoDB, 26 void* buffer, 27 const <A href="PRCPrototypeList.html">PRCPrototypeList</A>* prototypeList, 28 u32 kindMask, 29 BOOL ignoreDisabledEntries, 30 const <A href="PRCPrototypeDBParam.html">PRCPrototypeDBParam</A>* param ); 31</CODE></PRE></dd> 32</dl> 33 34<h2>Arguments</h2> 35<table border="1" width="100%"> 36 <tr> 37<td width="13%"><CODE>protoDB</CODE></td> 38<td width="87%">Pointer to the sample DB structure to be created.</td> 39 </tr> 40 <tr> 41<td width="13%"><CODE>buffer</CODE></td> 42<td width="87%">Pointer to the memory area that will be used in <code>protoDB</code>.</td> 43 </tr> 44 <tr> 45<td width="13%"><CODE>prototypeList</CODE></td> 46<td width="87%">Pointer to the sample pattern list.</td> 47 </tr> 48 <tr> 49<td width="13%"><CODE>kindMask</CODE></td> 50<td width="87%">Bit field used to select the pattern type of the sample DB entry that will be taken into the sample DB.</td> 51 </tr> 52 <tr> 53<td width="13%"><CODE>ignoreDisabledEntries</CODE></td> 54<td width="87%">Designates whether a sample entry whose <code>enabled</code> flag is FALSE should be ignored.</td> 55 </tr> 56 <tr> 57<td width="13%"><CODE>param</CODE></td> 58<td width="87%">Other parameter values that are dependent on the recognition algorithm (use NULL as the default).</td> 59 </tr> 60 </table> 61 62<h2>Return Values</h2> 63<p>Returns <CODE>TRUE</CODE> if input pattern data is created successfully.</p> 64 65<H2>Description</H2> 66<P>Converts the <A href="PRCPrototypeList.html"><CODE>PRCPrototypeList</CODE></A> type sample pattern list into the <A href="PRCPrototypeDB.html"><CODE>PRCPrototypeDB</CODE></A> type sample DB that is used for recognition. This function precalculates length, angle, bounding box, and other values used for recognition from a sample pattern list that contains only strokes, and stores them as a sample DB. Depending on the size of the sample DB, the cost of the process can be extremely high.</P> 67<P>The <code>buffer</code> argument specifies the memory region used internally by <code>protoDB</code>. First, use <A href="PRC_GetPrototypeDBBufferSize.html"><CODE>PRC_GetPrototypeDBBufferSize*</CODE></A> to get the amount of memory required, and then allocate at least that amount. Do not free <code>buffer</code> while <code>protoDB</code> is in use.</P> 68<P>The logical AND of the <code>kindMask</code> value and the value of <code>kind</code> for each sample DB entry in the <code>prototypeList</code> is performed. The entry will be brought into the sample DB if the result is non-zero. Specifying <code>PRC_KIND_ALL</code> in <code>kindMask</code> will select all <code>kind</code> instances. If <code>ignoreDisabledEntries</code> is <CODE>TRUE</CODE>, sample DB entries whose <code>enabled</code> flag is <CODE>FALSE</CODE> will not be imported, even if their <code>kind</code> values match.</P> 69<P><code>PRC_InitPrototypeDB(protoDB, buffer, bufferSize, prototypeList)</code> is the same as <code>PRC_InitPrototypeDBEx(protoDB, buffer, bufferSize, prototypeList, PRC_KIND_ALL, FALSE, NULL)</code>.</P> 70<h2>See Also</h2> 71<p><A href="PRC_GetPrototypeDBBufferSize.html"><CODE>PRC_GetPrototypeDBBufferSize</CODE></a><BR> <a href="PRC_GetPrototypeDBBufferSize.html"><CODE>PRC_GetPrototypeDBBufferSizeEx</CODE></a><BR> <a href="PRC_GetRecognizedEntry.html"><CODE>PRC_GetRecognizedEntry*</CODE></A></p> 72 73<H2>Revision History</H2> 74<P>2005/03/04 Changed return value to BOOL.<BR>2004/06/23 Initial version.</P> 75<hr><p>CONFIDENTIAL</p></body> 76</html> 77