<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.14"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>tesseract: classify/ocrfeatures.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(initResizable); /* @license-end */</script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">tesseract  <span id="projectnumber">3.05.02</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.14 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); /* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('a00794.html','');}); /* @license-end */ </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="summary"> <a href="#nested-classes">Classes</a> | <a href="#define-members">Macros</a> | <a href="#typedef-members">Typedefs</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">ocrfeatures.h File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include "<a class="el" href="a00215_source.html">blobs.h</a>"</code><br /> <code>#include <stdio.h></code><br /> </div> <p><a href="a00794_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Classes</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a04261.html">PARAM_DESC</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a04265.html">FEATURE_DESC_STRUCT</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a04269.html">FEATURE_STRUCT</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a04273.html">FEATURE_SET_STRUCT</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> Macros</h2></td></tr> <tr class="memitem:a988007e06743db204d076f3c68161469"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#a988007e06743db204d076f3c68161469">FEAT_NAME_SIZE</a>   80</td></tr> <tr class="separator:a988007e06743db204d076f3c68161469"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af670b92d0a3b0562bca5b53eb0fd10d7"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#af670b92d0a3b0562bca5b53eb0fd10d7">ILLEGAL_FEATURE_PARAM</a>   1000</td></tr> <tr class="separator:af670b92d0a3b0562bca5b53eb0fd10d7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab63ebb4f4faddf28b6ef934606284e98"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#ab63ebb4f4faddf28b6ef934606284e98">ILLEGAL_NUM_FEATURES</a>   1001</td></tr> <tr class="separator:ab63ebb4f4faddf28b6ef934606284e98"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab167eb0dd11bcdc485185da17528554e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#ab167eb0dd11bcdc485185da17528554e">StartParamDesc</a>(Name)   const <a class="el" href="a04261.html">PARAM_DESC</a> Name[] = {</td></tr> <tr class="separator:ab167eb0dd11bcdc485185da17528554e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2c9b19bf68ac985b694b63908c903ac7"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#a2c9b19bf68ac985b694b63908c903ac7">DefineParam</a>(Circular, NonEssential, Min, Max)</td></tr> <tr class="separator:a2c9b19bf68ac985b694b63908c903ac7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a24f96cc11dfea22b55b18b2e991be813"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#a24f96cc11dfea22b55b18b2e991be813">EndParamDesc</a>   };</td></tr> <tr class="separator:a24f96cc11dfea22b55b18b2e991be813"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6998a902eeedeb654f5209cd390c69c3"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#a6998a902eeedeb654f5209cd390c69c3">DefineFeature</a>(Name, NL, NC, SN, PN)</td></tr> <tr class="separator:a6998a902eeedeb654f5209cd390c69c3"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> Typedefs</h2></td></tr> <tr class="memitem:a56ac79f6f0f7b13cef8664a95e131380"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="a04265.html">FEATURE_DESC_STRUCT</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#a56ac79f6f0f7b13cef8664a95e131380">FEATURE_DESC</a></td></tr> <tr class="separator:a56ac79f6f0f7b13cef8664a95e131380"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a19902c8e979ab51dbf6be841e4048f7d"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="a04269.html">FEATURE_STRUCT</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a></td></tr> <tr class="separator:a19902c8e979ab51dbf6be841e4048f7d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac0c2f756ba2c7f34a21efbe13a49ac39"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="a04273.html">FEATURE_SET_STRUCT</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a></td></tr> <tr class="separator:ac0c2f756ba2c7f34a21efbe13a49ac39"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4e78d165adc7a1b8c5bf790563265d97"><td class="memItemLeft" align="right" valign="top">typedef char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#a4e78d165adc7a1b8c5bf790563265d97">CHAR_FEATURES</a></td></tr> <tr class="separator:a4e78d165adc7a1b8c5bf790563265d97"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:a09f4fe91126bd64e3c8dcd3327343639"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00524.html#a7712a7e28433d0ade59219a129549b6f">BOOL8</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#a09f4fe91126bd64e3c8dcd3327343639">AddFeature</a> (<a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a> FeatureSet, <a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a> Feature)</td></tr> <tr class="separator:a09f4fe91126bd64e3c8dcd3327343639"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:acaf54a6410150ec74f66ec6621f1352f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#acaf54a6410150ec74f66ec6621f1352f">FreeFeature</a> (<a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a> Feature)</td></tr> <tr class="separator:acaf54a6410150ec74f66ec6621f1352f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab9d5e26995ac35cfbc75ec95976c32de"><td class="memItemLeft" align="right" valign="top">void <a class="el" href="a00566.html#a86e51270628c53ce7e2c23b1c2b4490e">TESS_API</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#ab9d5e26995ac35cfbc75ec95976c32de">FreeFeatureSet</a> (<a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a> FeatureSet)</td></tr> <tr class="separator:ab9d5e26995ac35cfbc75ec95976c32de"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a32a08c42617c8dd6a156c1c8d7fb2cbb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#a32a08c42617c8dd6a156c1c8d7fb2cbb">NewFeature</a> (const <a class="el" href="a04265.html">FEATURE_DESC_STRUCT</a> *FeatureDesc)</td></tr> <tr class="separator:a32a08c42617c8dd6a156c1c8d7fb2cbb"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:acdf1bcf73857cfc37fe8d667203bc875"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#acdf1bcf73857cfc37fe8d667203bc875">NewFeatureSet</a> (int NumFeatures)</td></tr> <tr class="separator:acdf1bcf73857cfc37fe8d667203bc875"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:acb869be1d5f3f8ad1e42c81f10368923"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#acb869be1d5f3f8ad1e42c81f10368923">ReadFeature</a> (FILE *File, const <a class="el" href="a04265.html">FEATURE_DESC_STRUCT</a> *FeatureDesc)</td></tr> <tr class="separator:acb869be1d5f3f8ad1e42c81f10368923"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:adbac3342338c1fb0f38aad20c3c324d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#adbac3342338c1fb0f38aad20c3c324d8">ReadFeatureSet</a> (FILE *File, const <a class="el" href="a04265.html">FEATURE_DESC_STRUCT</a> *FeatureDesc)</td></tr> <tr class="separator:adbac3342338c1fb0f38aad20c3c324d8"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9a4f2ae05190733d360254a74880136c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#a9a4f2ae05190733d360254a74880136c">WriteFeature</a> (<a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a> Feature, <a class="el" href="a02929.html">STRING</a> *str)</td></tr> <tr class="separator:a9a4f2ae05190733d360254a74880136c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a44ea92b531291019aad76b8941cc75af"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00794.html#a44ea92b531291019aad76b8941cc75af">WriteFeatureSet</a> (<a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a> FeatureSet, <a class="el" href="a02929.html">STRING</a> *str)</td></tr> <tr class="separator:a44ea92b531291019aad76b8941cc75af"><td class="memSeparator" colspan="2"> </td></tr> </table> <h2 class="groupheader">Macro Definition Documentation</h2> <a id="a6998a902eeedeb654f5209cd390c69c3"></a> <h2 class="memtitle"><span class="permalink"><a href="#a6998a902eeedeb654f5209cd390c69c3">◆ </a></span>DefineFeature</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define DefineFeature</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">Name, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">NL, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">NC, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">SN, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">PN </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <b>Value:</b><div class="fragment"><div class="line"><span class="keyword">const</span> <a class="code" href="a04265.html">FEATURE_DESC_STRUCT</a> Name = { \</div><div class="line"> ((NL) + (NC)), SN, PN};</div><div class="ttc" id="a04265_html"><div class="ttname"><a href="a04265.html">FEATURE_DESC_STRUCT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00056">ocrfeatures.h:56</a></div></div> </div><!-- fragment --> <p class="definition">Definition at line <a class="el" href="a00794_source.html#l00100">100</a> of file <a class="el" href="a00794_source.html">ocrfeatures.h</a>.</p> </div> </div> <a id="a2c9b19bf68ac985b694b63908c903ac7"></a> <h2 class="memtitle"><span class="permalink"><a href="#a2c9b19bf68ac985b694b63908c903ac7">◆ </a></span>DefineParam</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define DefineParam</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">Circular, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">NonEssential, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">Min, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">Max </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <b>Value:</b><div class="fragment"><div class="line">{Circular, NonEssential, Min, Max, \</div><div class="line"> (Max) - (Min), (((Max) - (Min))/2.0), (((Max) + (Min))/2.0)},</div></div><!-- fragment --> <p class="definition">Definition at line <a class="el" href="a00794_source.html#l00088">88</a> of file <a class="el" href="a00794_source.html">ocrfeatures.h</a>.</p> </div> </div> <a id="a24f96cc11dfea22b55b18b2e991be813"></a> <h2 class="memtitle"><span class="permalink"><a href="#a24f96cc11dfea22b55b18b2e991be813">◆ </a></span>EndParamDesc</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define EndParamDesc   };</td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a00794_source.html#l00092">92</a> of file <a class="el" href="a00794_source.html">ocrfeatures.h</a>.</p> </div> </div> <a id="a988007e06743db204d076f3c68161469"></a> <h2 class="memtitle"><span class="permalink"><a href="#a988007e06743db204d076f3c68161469">◆ </a></span>FEAT_NAME_SIZE</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define FEAT_NAME_SIZE   80</td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a00794_source.html#l00033">33</a> of file <a class="el" href="a00794_source.html">ocrfeatures.h</a>.</p> </div> </div> <a id="af670b92d0a3b0562bca5b53eb0fd10d7"></a> <h2 class="memtitle"><span class="permalink"><a href="#af670b92d0a3b0562bca5b53eb0fd10d7">◆ </a></span>ILLEGAL_FEATURE_PARAM</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ILLEGAL_FEATURE_PARAM   1000</td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a00794_source.html#l00036">36</a> of file <a class="el" href="a00794_source.html">ocrfeatures.h</a>.</p> </div> </div> <a id="ab63ebb4f4faddf28b6ef934606284e98"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab63ebb4f4faddf28b6ef934606284e98">◆ </a></span>ILLEGAL_NUM_FEATURES</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ILLEGAL_NUM_FEATURES   1001</td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a00794_source.html#l00037">37</a> of file <a class="el" href="a00794_source.html">ocrfeatures.h</a>.</p> </div> </div> <a id="ab167eb0dd11bcdc485185da17528554e"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab167eb0dd11bcdc485185da17528554e">◆ </a></span>StartParamDesc</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define StartParamDesc</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">Name</td><td>)</td> <td>   const <a class="el" href="a04261.html">PARAM_DESC</a> Name[] = {</td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a00794_source.html#l00085">85</a> of file <a class="el" href="a00794_source.html">ocrfeatures.h</a>.</p> </div> </div> <h2 class="groupheader">Typedef Documentation</h2> <a id="a4e78d165adc7a1b8c5bf790563265d97"></a> <h2 class="memtitle"><span class="permalink"><a href="#a4e78d165adc7a1b8c5bf790563265d97">◆ </a></span>CHAR_FEATURES</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef char* <a class="el" href="a00794.html#a4e78d165adc7a1b8c5bf790563265d97">CHAR_FEATURES</a></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a00794_source.html#l00080">80</a> of file <a class="el" href="a00794_source.html">ocrfeatures.h</a>.</p> </div> </div> <a id="a19902c8e979ab51dbf6be841e4048f7d"></a> <h2 class="memtitle"><span class="permalink"><a href="#a19902c8e979ab51dbf6be841e4048f7d">◆ </a></span>FEATURE</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef <a class="el" href="a04269.html">FEATURE_STRUCT</a>* <a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a00794_source.html#l00067">67</a> of file <a class="el" href="a00794_source.html">ocrfeatures.h</a>.</p> </div> </div> <a id="a56ac79f6f0f7b13cef8664a95e131380"></a> <h2 class="memtitle"><span class="permalink"><a href="#a56ac79f6f0f7b13cef8664a95e131380">◆ </a></span>FEATURE_DESC</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef <a class="el" href="a04265.html">FEATURE_DESC_STRUCT</a>* <a class="el" href="a00794.html#a56ac79f6f0f7b13cef8664a95e131380">FEATURE_DESC</a></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a00794_source.html#l00061">61</a> of file <a class="el" href="a00794_source.html">ocrfeatures.h</a>.</p> </div> </div> <a id="ac0c2f756ba2c7f34a21efbe13a49ac39"></a> <h2 class="memtitle"><span class="permalink"><a href="#ac0c2f756ba2c7f34a21efbe13a49ac39">◆ </a></span>FEATURE_SET</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef <a class="el" href="a04273.html">FEATURE_SET_STRUCT</a>* <a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a00794_source.html#l00074">74</a> of file <a class="el" href="a00794_source.html">ocrfeatures.h</a>.</p> </div> </div> <h2 class="groupheader">Function Documentation</h2> <a id="a09f4fe91126bd64e3c8dcd3327343639"></a> <h2 class="memtitle"><span class="permalink"><a href="#a09f4fe91126bd64e3c8dcd3327343639">◆ </a></span>AddFeature()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00524.html#a7712a7e28433d0ade59219a129549b6f">BOOL8</a> AddFeature </td> <td>(</td> <td class="paramtype"><a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a> </td> <td class="paramname"><em>FeatureSet</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a> </td> <td class="paramname"><em>Feature</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Add a feature to a feature set. If the feature set is already full, FALSE is returned to indicate that the feature could not be added to the set; otherwise, TRUE is returned. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">FeatureSet</td><td>set of features to add Feature to </td></tr> <tr><td class="paramname">Feature</td><td>feature to be added to FeatureSet </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>TRUE if feature added to set, FALSE if set is already full. </dd></dl> <dl class="section note"><dt>Note</dt><dd>History: Tue May 22 17:22:23 1990, DSJ, Created. </dd></dl> <p class="definition">Definition at line <a class="el" href="a00791_source.html#l00044">44</a> of file <a class="el" href="a00791_source.html">ocrfeatures.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  {</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">if</span> (FeatureSet-><a class="code" href="a04273.html#a154a6ca419f3f16fccf11b7217351570">NumFeatures</a> >= FeatureSet-><a class="code" href="a04273.html#a929fdddbb7cb689f66b59e06d51aee46">MaxNumFeatures</a>) {</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="a00791.html#acaf54a6410150ec74f66ec6621f1352f">FreeFeature</a>(Feature);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordflow">return</span> <a class="code" href="a00014.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  }</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  FeatureSet-><a class="code" href="a04273.html#a4664d6a22a9d12f4011de4d877664c45">Features</a>[FeatureSet-><a class="code" href="a04273.html#a154a6ca419f3f16fccf11b7217351570">NumFeatures</a>++] = Feature;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordflow">return</span> <a class="code" href="a00014.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> } <span class="comment">/* AddFeature */</span></div><div class="ttc" id="a00014_html_aa8cecfc5c5c054d2875c03e77b7be15d"><div class="ttname"><a href="a00014.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a></div><div class="ttdeci">#define TRUE</div><div class="ttdef"><b>Definition:</b> <a href="a00014_source.html#l00045">capi.h:45</a></div></div> <div class="ttc" id="a00791_html_acaf54a6410150ec74f66ec6621f1352f"><div class="ttname"><a href="a00791.html#acaf54a6410150ec74f66ec6621f1352f">FreeFeature</a></div><div class="ttdeci">void FreeFeature(FEATURE Feature)</div><div class="ttdef"><b>Definition:</b> <a href="a00791_source.html#l00060">ocrfeatures.cpp:60</a></div></div> <div class="ttc" id="a00014_html_aa93f0eb578d23995850d61f7d61c55c1"><div class="ttname"><a href="a00014.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a></div><div class="ttdeci">#define FALSE</div><div class="ttdef"><b>Definition:</b> <a href="a00014_source.html#l00046">capi.h:46</a></div></div> <div class="ttc" id="a04273_html_a929fdddbb7cb689f66b59e06d51aee46"><div class="ttname"><a href="a04273.html#a929fdddbb7cb689f66b59e06d51aee46">FEATURE_SET_STRUCT::MaxNumFeatures</a></div><div class="ttdeci">uinT16 MaxNumFeatures</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00071">ocrfeatures.h:71</a></div></div> <div class="ttc" id="a04273_html_a154a6ca419f3f16fccf11b7217351570"><div class="ttname"><a href="a04273.html#a154a6ca419f3f16fccf11b7217351570">FEATURE_SET_STRUCT::NumFeatures</a></div><div class="ttdeci">uinT16 NumFeatures</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00070">ocrfeatures.h:70</a></div></div> <div class="ttc" id="a04273_html_a4664d6a22a9d12f4011de4d877664c45"><div class="ttname"><a href="a04273.html#a4664d6a22a9d12f4011de4d877664c45">FEATURE_SET_STRUCT::Features</a></div><div class="ttdeci">FEATURE Features[1]</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00072">ocrfeatures.h:72</a></div></div> </div><!-- fragment --> </div> </div> <a id="acaf54a6410150ec74f66ec6621f1352f"></a> <h2 class="memtitle"><span class="permalink"><a href="#acaf54a6410150ec74f66ec6621f1352f">◆ </a></span>FreeFeature()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void FreeFeature </td> <td>(</td> <td class="paramtype"><a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a> </td> <td class="paramname"><em>Feature</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Release the memory consumed by the specified feature. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">Feature</td><td>feature to be deallocated. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>none </dd></dl> <dl class="section note"><dt>Note</dt><dd>History: Mon May 21 13:33:27 1990, DSJ, Created. </dd></dl> <p class="definition">Definition at line <a class="el" href="a00791_source.html#l00060">60</a> of file <a class="el" href="a00791_source.html">ocrfeatures.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  {</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordflow">if</span> (Feature) {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <a class="code" href="a00542.html#a204a6cd6de69d4bd7a73ca30e0a0f947">free_struct</a> (Feature, <span class="keyword">sizeof</span> (<a class="code" href="a04269.html">FEATURE_STRUCT</a>)</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  + <span class="keyword">sizeof</span> (<a class="code" href="a00524.html#a6a3da5f1db8d485c0d2f5a7ba526c4a0">FLOAT32</a>) * (Feature-><a class="code" href="a04269.html#a1a034f275ff504afd63bd99643fae589">Type</a>-><a class="code" href="a04265.html#a0edbab02900ae01549f742582236eb6d">NumParams</a> - 1),</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="stringliteral">"sizeof(FEATURE_STRUCT)+sizeof(FLOAT32)*(NumParamsIn(Feature)-1)"</span>);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  }</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> } <span class="comment">/* FreeFeature */</span></div><div class="ttc" id="a00542_html_a204a6cd6de69d4bd7a73ca30e0a0f947"><div class="ttname"><a href="a00542.html#a204a6cd6de69d4bd7a73ca30e0a0f947">free_struct</a></div><div class="ttdeci">void free_struct(void *deadstruct, inT32, const char *)</div><div class="ttdef"><b>Definition:</b> <a href="a00542_source.html#l00043">memry.cpp:43</a></div></div> <div class="ttc" id="a00524_html_a6a3da5f1db8d485c0d2f5a7ba526c4a0"><div class="ttname"><a href="a00524.html#a6a3da5f1db8d485c0d2f5a7ba526c4a0">FLOAT32</a></div><div class="ttdeci">float FLOAT32</div><div class="ttdef"><b>Definition:</b> <a href="a00524_source.html#l00044">host.h:44</a></div></div> <div class="ttc" id="a04269_html_a1a034f275ff504afd63bd99643fae589"><div class="ttname"><a href="a04269.html#a1a034f275ff504afd63bd99643fae589">FEATURE_STRUCT::Type</a></div><div class="ttdeci">const FEATURE_DESC_STRUCT * Type</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00064">ocrfeatures.h:64</a></div></div> <div class="ttc" id="a04269_html"><div class="ttname"><a href="a04269.html">FEATURE_STRUCT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00063">ocrfeatures.h:63</a></div></div> <div class="ttc" id="a04265_html_a0edbab02900ae01549f742582236eb6d"><div class="ttname"><a href="a04265.html#a0edbab02900ae01549f742582236eb6d">FEATURE_DESC_STRUCT::NumParams</a></div><div class="ttdeci">uinT16 NumParams</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00057">ocrfeatures.h:57</a></div></div> </div><!-- fragment --> </div> </div> <a id="ab9d5e26995ac35cfbc75ec95976c32de"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab9d5e26995ac35cfbc75ec95976c32de">◆ </a></span>FreeFeatureSet()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void <a class="el" href="a00566.html#a86e51270628c53ce7e2c23b1c2b4490e">TESS_API</a> FreeFeatureSet </td> <td>(</td> <td class="paramtype"><a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a> </td> <td class="paramname"><em>FeatureSet</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Release the memory consumed by the specified feature set. This routine also frees the memory consumed by the features contained in the set. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">FeatureSet</td><td>set of features to be freed </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>none </dd></dl> <dl class="section note"><dt>Note</dt><dd>History: Mon May 21 13:59:46 1990, DSJ, Created. </dd></dl> <p class="definition">Definition at line <a class="el" href="a00791_source.html#l00077">77</a> of file <a class="el" href="a00791_source.html">ocrfeatures.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  {</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordtype">int</span> i;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">if</span> (FeatureSet) {</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keywordflow">for</span> (i = 0; i < FeatureSet-><a class="code" href="a04273.html#a154a6ca419f3f16fccf11b7217351570">NumFeatures</a>; i++)</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <a class="code" href="a00791.html#acaf54a6410150ec74f66ec6621f1352f">FreeFeature</a>(FeatureSet-><a class="code" href="a04273.html#a4664d6a22a9d12f4011de4d877664c45">Features</a>[i]);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="a01112.html#ab462a857e5edf360ae4881bcc92a0bcf">memfree</a>(FeatureSet);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  }</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> } <span class="comment">/* FreeFeatureSet */</span></div><div class="ttc" id="a00791_html_acaf54a6410150ec74f66ec6621f1352f"><div class="ttname"><a href="a00791.html#acaf54a6410150ec74f66ec6621f1352f">FreeFeature</a></div><div class="ttdeci">void FreeFeature(FEATURE Feature)</div><div class="ttdef"><b>Definition:</b> <a href="a00791_source.html#l00060">ocrfeatures.cpp:60</a></div></div> <div class="ttc" id="a01112_html_ab462a857e5edf360ae4881bcc92a0bcf"><div class="ttname"><a href="a01112.html#ab462a857e5edf360ae4881bcc92a0bcf">memfree</a></div><div class="ttdeci">void memfree(void *element)</div><div class="ttdef"><b>Definition:</b> <a href="a01112_source.html#l00030">freelist.cpp:30</a></div></div> <div class="ttc" id="a04273_html_a154a6ca419f3f16fccf11b7217351570"><div class="ttname"><a href="a04273.html#a154a6ca419f3f16fccf11b7217351570">FEATURE_SET_STRUCT::NumFeatures</a></div><div class="ttdeci">uinT16 NumFeatures</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00070">ocrfeatures.h:70</a></div></div> <div class="ttc" id="a04273_html_a4664d6a22a9d12f4011de4d877664c45"><div class="ttname"><a href="a04273.html#a4664d6a22a9d12f4011de4d877664c45">FEATURE_SET_STRUCT::Features</a></div><div class="ttdeci">FEATURE Features[1]</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00072">ocrfeatures.h:72</a></div></div> </div><!-- fragment --> </div> </div> <a id="a32a08c42617c8dd6a156c1c8d7fb2cbb"></a> <h2 class="memtitle"><span class="permalink"><a href="#a32a08c42617c8dd6a156c1c8d7fb2cbb">◆ </a></span>NewFeature()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a> NewFeature </td> <td>(</td> <td class="paramtype">const <a class="el" href="a04265.html">FEATURE_DESC_STRUCT</a> * </td> <td class="paramname"><em>FeatureDesc</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Allocate and return a new feature of the specified type. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">FeatureDesc</td><td>description of feature to be created. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>New <a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a>. </dd></dl> <dl class="section note"><dt>Note</dt><dd>History: Mon May 21 14:06:42 1990, DSJ, Created. </dd></dl> <p class="definition">Definition at line <a class="el" href="a00791_source.html#l00094">94</a> of file <a class="el" href="a00791_source.html">ocrfeatures.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  {</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="a04269.html">FEATURE</a> Feature;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  Feature = (<a class="code" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a>) <a class="code" href="a00542.html#a4f4e6728de23eb0530f9bdc8b3a114d3">alloc_struct</a> (<span class="keyword">sizeof</span> (<a class="code" href="a04269.html">FEATURE_STRUCT</a>) +</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  (FeatureDesc-><a class="code" href="a04265.html#a0edbab02900ae01549f742582236eb6d">NumParams</a> - 1) *</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keyword">sizeof</span> (<a class="code" href="a00524.html#a6a3da5f1db8d485c0d2f5a7ba526c4a0">FLOAT32</a>),</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="stringliteral">"sizeof(FEATURE_STRUCT)+sizeof(FLOAT32)*(NumParamsIn(Feature)-1)"</span>);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  Feature-><a class="code" href="a04269.html#a1a034f275ff504afd63bd99643fae589">Type</a> = FeatureDesc;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keywordflow">return</span> (Feature);</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> </div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> } <span class="comment">/* NewFeature */</span></div><div class="ttc" id="a00794_html_a19902c8e979ab51dbf6be841e4048f7d"><div class="ttname"><a href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a></div><div class="ttdeci">FEATURE_STRUCT * FEATURE</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00067">ocrfeatures.h:67</a></div></div> <div class="ttc" id="a00524_html_a6a3da5f1db8d485c0d2f5a7ba526c4a0"><div class="ttname"><a href="a00524.html#a6a3da5f1db8d485c0d2f5a7ba526c4a0">FLOAT32</a></div><div class="ttdeci">float FLOAT32</div><div class="ttdef"><b>Definition:</b> <a href="a00524_source.html#l00044">host.h:44</a></div></div> <div class="ttc" id="a04269_html_a1a034f275ff504afd63bd99643fae589"><div class="ttname"><a href="a04269.html#a1a034f275ff504afd63bd99643fae589">FEATURE_STRUCT::Type</a></div><div class="ttdeci">const FEATURE_DESC_STRUCT * Type</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00064">ocrfeatures.h:64</a></div></div> <div class="ttc" id="a04269_html"><div class="ttname"><a href="a04269.html">FEATURE_STRUCT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00063">ocrfeatures.h:63</a></div></div> <div class="ttc" id="a00542_html_a4f4e6728de23eb0530f9bdc8b3a114d3"><div class="ttname"><a href="a00542.html#a4f4e6728de23eb0530f9bdc8b3a114d3">alloc_struct</a></div><div class="ttdeci">void * alloc_struct(inT32 count, const char *)</div><div class="ttdef"><b>Definition:</b> <a href="a00542_source.html#l00039">memry.cpp:39</a></div></div> <div class="ttc" id="a04265_html_a0edbab02900ae01549f742582236eb6d"><div class="ttname"><a href="a04265.html#a0edbab02900ae01549f742582236eb6d">FEATURE_DESC_STRUCT::NumParams</a></div><div class="ttdeci">uinT16 NumParams</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00057">ocrfeatures.h:57</a></div></div> </div><!-- fragment --> </div> </div> <a id="acdf1bcf73857cfc37fe8d667203bc875"></a> <h2 class="memtitle"><span class="permalink"><a href="#acdf1bcf73857cfc37fe8d667203bc875">◆ </a></span>NewFeatureSet()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a> NewFeatureSet </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>NumFeatures</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Allocate and return a new feature set large enough to hold the specified number of features. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">NumFeatures</td><td>maximum # of features to be put in feature set </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>New <a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a>. </dd></dl> <dl class="section note"><dt>Note</dt><dd>History: Mon May 21 14:22:40 1990, DSJ, Created. </dd></dl> <p class="definition">Definition at line <a class="el" href="a00791_source.html#l00113">113</a> of file <a class="el" href="a00791_source.html">ocrfeatures.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  {</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <a class="code" href="a04273.html">FEATURE_SET</a> FeatureSet;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> </div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  FeatureSet = (<a class="code" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a>) <a class="code" href="a01106.html#a9bdc0885c33bbb5b062c77b1d90e2305">Emalloc</a> (<span class="keyword">sizeof</span> (<a class="code" href="a04273.html">FEATURE_SET_STRUCT</a>) +</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  (NumFeatures - 1) * <span class="keyword">sizeof</span> (<a class="code" href="a04269.html">FEATURE</a>));</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  FeatureSet-><a class="code" href="a04273.html#a929fdddbb7cb689f66b59e06d51aee46">MaxNumFeatures</a> = NumFeatures;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  FeatureSet-><a class="code" href="a04273.html#a154a6ca419f3f16fccf11b7217351570">NumFeatures</a> = 0;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">return</span> (FeatureSet);</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> } <span class="comment">/* NewFeatureSet */</span></div><div class="ttc" id="a04273_html"><div class="ttname"><a href="a04273.html">FEATURE_SET_STRUCT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00069">ocrfeatures.h:69</a></div></div> <div class="ttc" id="a00794_html_ac0c2f756ba2c7f34a21efbe13a49ac39"><div class="ttname"><a href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a></div><div class="ttdeci">FEATURE_SET_STRUCT * FEATURE_SET</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00074">ocrfeatures.h:74</a></div></div> <div class="ttc" id="a04273_html_a929fdddbb7cb689f66b59e06d51aee46"><div class="ttname"><a href="a04273.html#a929fdddbb7cb689f66b59e06d51aee46">FEATURE_SET_STRUCT::MaxNumFeatures</a></div><div class="ttdeci">uinT16 MaxNumFeatures</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00071">ocrfeatures.h:71</a></div></div> <div class="ttc" id="a04273_html_a154a6ca419f3f16fccf11b7217351570"><div class="ttname"><a href="a04273.html#a154a6ca419f3f16fccf11b7217351570">FEATURE_SET_STRUCT::NumFeatures</a></div><div class="ttdeci">uinT16 NumFeatures</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00070">ocrfeatures.h:70</a></div></div> <div class="ttc" id="a04269_html"><div class="ttname"><a href="a04269.html">FEATURE_STRUCT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00063">ocrfeatures.h:63</a></div></div> <div class="ttc" id="a01106_html_a9bdc0885c33bbb5b062c77b1d90e2305"><div class="ttname"><a href="a01106.html#a9bdc0885c33bbb5b062c77b1d90e2305">Emalloc</a></div><div class="ttdeci">void * Emalloc(int Size)</div><div class="ttdef"><b>Definition:</b> <a href="a01106_source.html#l00047">emalloc.cpp:47</a></div></div> </div><!-- fragment --> </div> </div> <a id="acb869be1d5f3f8ad1e42c81f10368923"></a> <h2 class="memtitle"><span class="permalink"><a href="#acb869be1d5f3f8ad1e42c81f10368923">◆ </a></span>ReadFeature()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a> ReadFeature </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"><em>File</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="a04265.html">FEATURE_DESC_STRUCT</a> * </td> <td class="paramname"><em>FeatureDesc</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Create a new feature of the specified type and read in the value of its parameters from File. The extra penalty for the feature is also computed by calling the appropriate function for the specified feature type. The correct text representation for a feature is a list of N floats where N is the number of parameters in the feature. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">File</td><td>open text file to read feature from </td></tr> <tr><td class="paramname">FeatureDesc</td><td>specifies type of feature to read from File </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>New <a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a> read from File. </dd></dl> <dl class="section note"><dt>Note</dt><dd>Exceptions: <a class="el" href="a00794.html#af670b92d0a3b0562bca5b53eb0fd10d7">ILLEGAL_FEATURE_PARAM</a> if text file doesn't match expected format </dd> <dd> History: Wed May 23 08:53:16 1990, DSJ, Created. </dd></dl> <p class="definition">Definition at line <a class="el" href="a00791_source.html#l00138">138</a> of file <a class="el" href="a00791_source.html">ocrfeatures.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  {</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <a class="code" href="a04269.html">FEATURE</a> Feature;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordtype">int</span> i;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span> </div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  Feature = <a class="code" href="a00791.html#a32a08c42617c8dd6a156c1c8d7fb2cbb">NewFeature</a> (FeatureDesc);</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">for</span> (i = 0; i < Feature-><a class="code" href="a04269.html#a1a034f275ff504afd63bd99643fae589">Type</a>-><a class="code" href="a04265.html#a0edbab02900ae01549f742582236eb6d">NumParams</a>; i++) {</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">if</span> (<a class="code" href="a00572.html#aa11dd049f17d50a5af65fbd245e705d0">tfscanf</a>(File, <span class="stringliteral">"%f"</span>, &(Feature-><a class="code" href="a04269.html#ace52f36cfcba955504f4a24f86a897b4">Params</a>[i])) != 1)</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <a class="code" href="a01094.html#a480942fa88232bda23e9809e5afa9f25">DoError</a> (<a class="code" href="a00794.html#af670b92d0a3b0562bca5b53eb0fd10d7">ILLEGAL_FEATURE_PARAM</a>, <span class="stringliteral">"Illegal feature parameter spec"</span>);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="preprocessor">#ifndef _WIN32</span></div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  assert (!isnan(Feature-><a class="code" href="a04269.html#ace52f36cfcba955504f4a24f86a897b4">Params</a>[i]));</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  }</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">return</span> (Feature);</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span> } <span class="comment">/* ReadFeature */</span></div><div class="ttc" id="a00572_html_aa11dd049f17d50a5af65fbd245e705d0"><div class="ttname"><a href="a00572.html#aa11dd049f17d50a5af65fbd245e705d0">tfscanf</a></div><div class="ttdeci">int tfscanf(FILE *stream, const char *format,...)</div><div class="ttdef"><b>Definition:</b> <a href="a00572_source.html#l00228">scanutils.cpp:228</a></div></div> <div class="ttc" id="a04269_html_ace52f36cfcba955504f4a24f86a897b4"><div class="ttname"><a href="a04269.html#ace52f36cfcba955504f4a24f86a897b4">FEATURE_STRUCT::Params</a></div><div class="ttdeci">FLOAT32 Params[1]</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00065">ocrfeatures.h:65</a></div></div> <div class="ttc" id="a01094_html_a480942fa88232bda23e9809e5afa9f25"><div class="ttname"><a href="a01094.html#a480942fa88232bda23e9809e5afa9f25">DoError</a></div><div class="ttdeci">void DoError(int Error, const char *Message)</div><div class="ttdef"><b>Definition:</b> <a href="a01094_source.html#l00042">danerror.cpp:42</a></div></div> <div class="ttc" id="a00791_html_a32a08c42617c8dd6a156c1c8d7fb2cbb"><div class="ttname"><a href="a00791.html#a32a08c42617c8dd6a156c1c8d7fb2cbb">NewFeature</a></div><div class="ttdeci">FEATURE NewFeature(const FEATURE_DESC_STRUCT *FeatureDesc)</div><div class="ttdef"><b>Definition:</b> <a href="a00791_source.html#l00094">ocrfeatures.cpp:94</a></div></div> <div class="ttc" id="a04269_html_a1a034f275ff504afd63bd99643fae589"><div class="ttname"><a href="a04269.html#a1a034f275ff504afd63bd99643fae589">FEATURE_STRUCT::Type</a></div><div class="ttdeci">const FEATURE_DESC_STRUCT * Type</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00064">ocrfeatures.h:64</a></div></div> <div class="ttc" id="a04269_html"><div class="ttname"><a href="a04269.html">FEATURE_STRUCT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00063">ocrfeatures.h:63</a></div></div> <div class="ttc" id="a04265_html_a0edbab02900ae01549f742582236eb6d"><div class="ttname"><a href="a04265.html#a0edbab02900ae01549f742582236eb6d">FEATURE_DESC_STRUCT::NumParams</a></div><div class="ttdeci">uinT16 NumParams</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00057">ocrfeatures.h:57</a></div></div> <div class="ttc" id="a00794_html_af670b92d0a3b0562bca5b53eb0fd10d7"><div class="ttname"><a href="a00794.html#af670b92d0a3b0562bca5b53eb0fd10d7">ILLEGAL_FEATURE_PARAM</a></div><div class="ttdeci">#define ILLEGAL_FEATURE_PARAM</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00036">ocrfeatures.h:36</a></div></div> </div><!-- fragment --> </div> </div> <a id="adbac3342338c1fb0f38aad20c3c324d8"></a> <h2 class="memtitle"><span class="permalink"><a href="#adbac3342338c1fb0f38aad20c3c324d8">◆ </a></span>ReadFeatureSet()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a> ReadFeatureSet </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"><em>File</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="a04265.html">FEATURE_DESC_STRUCT</a> * </td> <td class="paramname"><em>FeatureDesc</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Create a new feature set of the specified type and read in the features from File. The correct text representation for a feature set is an integer which specifies the number (N) of features in a set followed by a list of N feature descriptions. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">File</td><td>open text file to read new feature set from </td></tr> <tr><td class="paramname">FeatureDesc</td><td>specifies type of feature to read from File </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>New feature set read from File. </dd></dl> <dl class="section note"><dt>Note</dt><dd>History: Wed May 23 09:17:31 1990, DSJ, Created. </dd></dl> <p class="definition">Definition at line <a class="el" href="a00791_source.html#l00164">164</a> of file <a class="el" href="a00791_source.html">ocrfeatures.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  {</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="a04273.html">FEATURE_SET</a> FeatureSet;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keywordtype">int</span> NumFeatures;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <span class="keywordtype">int</span> i;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span> </div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keywordflow">if</span> (<a class="code" href="a00572.html#aa11dd049f17d50a5af65fbd245e705d0">tfscanf</a>(File, <span class="stringliteral">"%d"</span>, &NumFeatures) != 1 || NumFeatures < 0)</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <a class="code" href="a01094.html#a480942fa88232bda23e9809e5afa9f25">DoError</a>(<a class="code" href="a00794.html#ab63ebb4f4faddf28b6ef934606284e98">ILLEGAL_NUM_FEATURES</a>, <span class="stringliteral">"Illegal number of features in set"</span>);</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span> </div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  FeatureSet = <a class="code" href="a00791.html#acdf1bcf73857cfc37fe8d667203bc875">NewFeatureSet</a>(NumFeatures);</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keywordflow">for</span> (i = 0; i < NumFeatures; i++)</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <a class="code" href="a00791.html#a09f4fe91126bd64e3c8dcd3327343639">AddFeature</a>(FeatureSet, <a class="code" href="a00791.html#acb869be1d5f3f8ad1e42c81f10368923">ReadFeature</a> (File, FeatureDesc));</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="keywordflow">return</span> (FeatureSet);</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span> } <span class="comment">/* ReadFeatureSet */</span></div><div class="ttc" id="a04273_html"><div class="ttname"><a href="a04273.html">FEATURE_SET_STRUCT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00069">ocrfeatures.h:69</a></div></div> <div class="ttc" id="a00572_html_aa11dd049f17d50a5af65fbd245e705d0"><div class="ttname"><a href="a00572.html#aa11dd049f17d50a5af65fbd245e705d0">tfscanf</a></div><div class="ttdeci">int tfscanf(FILE *stream, const char *format,...)</div><div class="ttdef"><b>Definition:</b> <a href="a00572_source.html#l00228">scanutils.cpp:228</a></div></div> <div class="ttc" id="a00794_html_ab63ebb4f4faddf28b6ef934606284e98"><div class="ttname"><a href="a00794.html#ab63ebb4f4faddf28b6ef934606284e98">ILLEGAL_NUM_FEATURES</a></div><div class="ttdeci">#define ILLEGAL_NUM_FEATURES</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00037">ocrfeatures.h:37</a></div></div> <div class="ttc" id="a00791_html_a09f4fe91126bd64e3c8dcd3327343639"><div class="ttname"><a href="a00791.html#a09f4fe91126bd64e3c8dcd3327343639">AddFeature</a></div><div class="ttdeci">BOOL8 AddFeature(FEATURE_SET FeatureSet, FEATURE Feature)</div><div class="ttdef"><b>Definition:</b> <a href="a00791_source.html#l00044">ocrfeatures.cpp:44</a></div></div> <div class="ttc" id="a01094_html_a480942fa88232bda23e9809e5afa9f25"><div class="ttname"><a href="a01094.html#a480942fa88232bda23e9809e5afa9f25">DoError</a></div><div class="ttdeci">void DoError(int Error, const char *Message)</div><div class="ttdef"><b>Definition:</b> <a href="a01094_source.html#l00042">danerror.cpp:42</a></div></div> <div class="ttc" id="a00791_html_acb869be1d5f3f8ad1e42c81f10368923"><div class="ttname"><a href="a00791.html#acb869be1d5f3f8ad1e42c81f10368923">ReadFeature</a></div><div class="ttdeci">FEATURE ReadFeature(FILE *File, const FEATURE_DESC_STRUCT *FeatureDesc)</div><div class="ttdef"><b>Definition:</b> <a href="a00791_source.html#l00138">ocrfeatures.cpp:138</a></div></div> <div class="ttc" id="a00791_html_acdf1bcf73857cfc37fe8d667203bc875"><div class="ttname"><a href="a00791.html#acdf1bcf73857cfc37fe8d667203bc875">NewFeatureSet</a></div><div class="ttdeci">FEATURE_SET NewFeatureSet(int NumFeatures)</div><div class="ttdef"><b>Definition:</b> <a href="a00791_source.html#l00113">ocrfeatures.cpp:113</a></div></div> </div><!-- fragment --> </div> </div> <a id="a9a4f2ae05190733d360254a74880136c"></a> <h2 class="memtitle"><span class="permalink"><a href="#a9a4f2ae05190733d360254a74880136c">◆ </a></span>WriteFeature()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void WriteFeature </td> <td>(</td> <td class="paramtype"><a class="el" href="a00794.html#a19902c8e979ab51dbf6be841e4048f7d">FEATURE</a> </td> <td class="paramname"><em>Feature</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a02929.html">STRING</a> * </td> <td class="paramname"><em>str</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Appends a textual representation of Feature to str. This representation is simply a list of the N parameters of the feature, terminated with a newline. It is assumed that the ExtraPenalty field can be reconstructed from the parameters of the feature. It is also assumed that the feature type information is specified or assumed elsewhere. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">Feature</td><td>feature to write out to str </td></tr> <tr><td class="paramname">str</td><td>string to write Feature to </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>none </dd></dl> <dl class="section note"><dt>Note</dt><dd>History: Wed May 23 09:28:18 1990, DSJ, Created. </dd></dl> <p class="definition">Definition at line <a class="el" href="a00791_source.html#l00191">191</a> of file <a class="el" href="a00791_source.html">ocrfeatures.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  {</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < Feature-><a class="code" href="a04269.html#a1a034f275ff504afd63bd99643fae589">Type</a>-><a class="code" href="a04265.html#a0edbab02900ae01549f742582236eb6d">NumParams</a>; i++) {</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> <span class="preprocessor">#ifndef WIN32</span></div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  assert(!isnan(Feature-><a class="code" href="a04269.html#ace52f36cfcba955504f4a24f86a897b4">Params</a>[i]));</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  str-><a class="code" href="a02929.html#a8b89aab090bf94ed9e0b05625ec6a397">add_str_double</a>(<span class="stringliteral">" "</span>, Feature-><a class="code" href="a04269.html#ace52f36cfcba955504f4a24f86a897b4">Params</a>[i]);</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  }</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  *str += <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span> } <span class="comment">/* WriteFeature */</span></div><div class="ttc" id="a02929_html_a8b89aab090bf94ed9e0b05625ec6a397"><div class="ttname"><a href="a02929.html#a8b89aab090bf94ed9e0b05625ec6a397">STRING::add_str_double</a></div><div class="ttdeci">void add_str_double(const char *str, double number)</div><div class="ttdef"><b>Definition:</b> <a href="a00590_source.html#l00394">strngs.cpp:394</a></div></div> <div class="ttc" id="a04269_html_ace52f36cfcba955504f4a24f86a897b4"><div class="ttname"><a href="a04269.html#ace52f36cfcba955504f4a24f86a897b4">FEATURE_STRUCT::Params</a></div><div class="ttdeci">FLOAT32 Params[1]</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00065">ocrfeatures.h:65</a></div></div> <div class="ttc" id="a04269_html_a1a034f275ff504afd63bd99643fae589"><div class="ttname"><a href="a04269.html#a1a034f275ff504afd63bd99643fae589">FEATURE_STRUCT::Type</a></div><div class="ttdeci">const FEATURE_DESC_STRUCT * Type</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00064">ocrfeatures.h:64</a></div></div> <div class="ttc" id="a04265_html_a0edbab02900ae01549f742582236eb6d"><div class="ttname"><a href="a04265.html#a0edbab02900ae01549f742582236eb6d">FEATURE_DESC_STRUCT::NumParams</a></div><div class="ttdeci">uinT16 NumParams</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00057">ocrfeatures.h:57</a></div></div> </div><!-- fragment --> </div> </div> <a id="a44ea92b531291019aad76b8941cc75af"></a> <h2 class="memtitle"><span class="permalink"><a href="#a44ea92b531291019aad76b8941cc75af">◆ </a></span>WriteFeatureSet()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void WriteFeatureSet </td> <td>(</td> <td class="paramtype"><a class="el" href="a00794.html#ac0c2f756ba2c7f34a21efbe13a49ac39">FEATURE_SET</a> </td> <td class="paramname"><em>FeatureSet</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a02929.html">STRING</a> * </td> <td class="paramname"><em>str</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Write a textual representation of FeatureSet to File. This representation is an integer specifying the number of features in the set, followed by a newline, followed by text representations for each feature in the set. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">FeatureSet</td><td>feature set to write to File </td></tr> <tr><td class="paramname">str</td><td>string to write Feature to </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>none </dd></dl> <dl class="section note"><dt>Note</dt><dd>History: Wed May 23 10:06:03 1990, DSJ, Created. </dd></dl> <p class="definition">Definition at line <a class="el" href="a00791_source.html#l00211">211</a> of file <a class="el" href="a00791_source.html">ocrfeatures.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  {</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keywordflow">if</span> (FeatureSet) {</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  str-><a class="code" href="a02929.html#a779cd637dd42d58d5500a3a657077e84">add_str_int</a>(<span class="stringliteral">""</span>, FeatureSet-><a class="code" href="a04273.html#a154a6ca419f3f16fccf11b7217351570">NumFeatures</a>);</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  *str += <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < FeatureSet-><a class="code" href="a04273.html#a154a6ca419f3f16fccf11b7217351570">NumFeatures</a>; i++) {</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <a class="code" href="a00791.html#a9a4f2ae05190733d360254a74880136c">WriteFeature</a>(FeatureSet-><a class="code" href="a04273.html#a4664d6a22a9d12f4011de4d877664c45">Features</a>[i], str);</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  }</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  }</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span> } <span class="comment">/* WriteFeatureSet */</span></div><div class="ttc" id="a00791_html_a9a4f2ae05190733d360254a74880136c"><div class="ttname"><a href="a00791.html#a9a4f2ae05190733d360254a74880136c">WriteFeature</a></div><div class="ttdeci">void WriteFeature(FEATURE Feature, STRING *str)</div><div class="ttdef"><b>Definition:</b> <a href="a00791_source.html#l00191">ocrfeatures.cpp:191</a></div></div> <div class="ttc" id="a02929_html_a779cd637dd42d58d5500a3a657077e84"><div class="ttname"><a href="a02929.html#a779cd637dd42d58d5500a3a657077e84">STRING::add_str_int</a></div><div class="ttdeci">void add_str_int(const char *str, int number)</div><div class="ttdef"><b>Definition:</b> <a href="a00590_source.html#l00384">strngs.cpp:384</a></div></div> <div class="ttc" id="a04273_html_a154a6ca419f3f16fccf11b7217351570"><div class="ttname"><a href="a04273.html#a154a6ca419f3f16fccf11b7217351570">FEATURE_SET_STRUCT::NumFeatures</a></div><div class="ttdeci">uinT16 NumFeatures</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00070">ocrfeatures.h:70</a></div></div> <div class="ttc" id="a04273_html_a4664d6a22a9d12f4011de4d877664c45"><div class="ttname"><a href="a04273.html#a4664d6a22a9d12f4011de4d877664c45">FEATURE_SET_STRUCT::Features</a></div><div class="ttdeci">FEATURE Features[1]</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00072">ocrfeatures.h:72</a></div></div> </div><!-- fragment --> </div> </div> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="dir_31c6146c13abcc5d811ec2a212816f48.html">classify</a></li><li class="navelem"><a class="el" href="a00794.html">ocrfeatures.h</a></li> <li class="footer">Generated on Mon Oct 29 2018 11:27:54 for tesseract by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li> </ul> </div> </body> </html>