mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-08 02:12:40 +08:00
doxygen classify/cutoffs.cpp
This commit is contained in:
parent
6e4165c0dc
commit
0267dec052
@ -15,9 +15,9 @@
|
|||||||
** See the License for the specific language governing permissions and
|
** See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
** limitations under the License.
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/**----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
Include Files and Type Defines
|
Include Files and Type Defines
|
||||||
----------------------------------------------------------------------------**/
|
----------------------------------------------------------------------------*/
|
||||||
#include "cutoffs.h"
|
#include "cutoffs.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -34,26 +34,21 @@
|
|||||||
|
|
||||||
#define MAX_CUTOFF 1000
|
#define MAX_CUTOFF 1000
|
||||||
|
|
||||||
/**----------------------------------------------------------------------------
|
|
||||||
Public Code
|
|
||||||
----------------------------------------------------------------------------**/
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
|
/**
|
||||||
|
* Open Filename, read in all of the class-id/cutoff pairs
|
||||||
|
* and insert them into the Cutoffs array. Cutoffs are
|
||||||
|
* indexed in the array by class id. Unused entries in the
|
||||||
|
* array are set to an arbitrarily high cutoff value.
|
||||||
|
* @param Filename name of file containing cutoff definitions
|
||||||
|
* @param Cutoffs array to put cutoffs into
|
||||||
|
* @return none
|
||||||
|
* @note Globals: none
|
||||||
|
* @note Exceptions: none
|
||||||
|
* @note History: Wed Feb 20 09:38:26 1991, DSJ, Created.
|
||||||
|
*/
|
||||||
void Classify::ReadNewCutoffs(FILE *CutoffFile, bool swap, inT64 end_offset,
|
void Classify::ReadNewCutoffs(FILE *CutoffFile, bool swap, inT64 end_offset,
|
||||||
CLASS_CUTOFF_ARRAY Cutoffs) {
|
CLASS_CUTOFF_ARRAY Cutoffs) {
|
||||||
/*
|
|
||||||
** Parameters:
|
|
||||||
** Filename name of file containing cutoff definitions
|
|
||||||
** Cutoffs array to put cutoffs into
|
|
||||||
** Globals: none
|
|
||||||
** Operation: Open Filename, read in all of the class-id/cutoff pairs
|
|
||||||
** and insert them into the Cutoffs array. Cutoffs are
|
|
||||||
** indexed in the array by class id. Unused entries in the
|
|
||||||
** array are set to an arbitrarily high cutoff value.
|
|
||||||
** Return: none
|
|
||||||
** Exceptions: none
|
|
||||||
** History: Wed Feb 20 09:38:26 1991, DSJ, Created.
|
|
||||||
*/
|
|
||||||
char Class[UNICHAR_LEN + 1];
|
char Class[UNICHAR_LEN + 1];
|
||||||
CLASS_ID ClassId;
|
CLASS_ID ClassId;
|
||||||
int Cutoff;
|
int Cutoff;
|
||||||
@ -78,6 +73,6 @@ void Classify::ReadNewCutoffs(FILE *CutoffFile, bool swap, inT64 end_offset,
|
|||||||
Cutoffs[ClassId] = Cutoff;
|
Cutoffs[ClassId] = Cutoff;
|
||||||
SkipNewline(CutoffFile);
|
SkipNewline(CutoffFile);
|
||||||
}
|
}
|
||||||
} /* ReadNewCutoffs */
|
}
|
||||||
|
|
||||||
} // namespace tesseract
|
} // namespace tesseract
|
||||||
|
Loading…
Reference in New Issue
Block a user