mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 06:53:36 +08:00
Fix Doxygen comments for void functions
Void functions should not use @return. It causes compiler warnings like this one: src/classify/intproto.cpp:326:5: warning: '@return' command used in a comment that is attached to a function returning void [-Wdocumentation] Some non-void functions also were documented with @return none. Fix those comments, too. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
9bc576fafc
commit
bf74471113
@ -849,8 +849,6 @@ bool Classify::AdaptableWord(WERD_RES* word) {
|
||||
* Globals:
|
||||
* - AllProtosOn dummy mask to match against all protos
|
||||
* - AllConfigsOn dummy mask to match against all configs
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
void Classify::AdaptToChar(TBLOB* Blob, CLASS_ID ClassId, int FontinfoId,
|
||||
float Threshold,
|
||||
|
@ -509,7 +509,6 @@ LIST ClusterSamples(CLUSTERER *Clusterer, CLUSTERCONFIG *Config) {
|
||||
* longer exist. Any sample lists that have been obtained
|
||||
* via calls to GetSamples are no longer valid.
|
||||
* @param Clusterer pointer to data structure to be freed
|
||||
* @return None
|
||||
*/
|
||||
void FreeClusterer(CLUSTERER *Clusterer) {
|
||||
if (Clusterer != nullptr) {
|
||||
@ -534,7 +533,6 @@ void FreeClusterer(CLUSTERER *Clusterer) {
|
||||
* specified list of prototypes. The clusters which are
|
||||
* pointed to by the prototypes are not freed.
|
||||
* @param ProtoList pointer to list of prototypes to be freed
|
||||
* @return None
|
||||
*/
|
||||
void FreeProtoList(LIST *ProtoList) {
|
||||
destroy_nodes(*ProtoList, FreePrototype);
|
||||
@ -546,7 +544,6 @@ void FreeProtoList(LIST *ProtoList) {
|
||||
* is no longer marked as a prototype. The cluster is NOT
|
||||
* deallocated by this routine.
|
||||
* @param arg prototype data structure to be deallocated
|
||||
* @return None
|
||||
*/
|
||||
void FreePrototype(void *arg) { //PROTOTYPE *Prototype)
|
||||
auto *Prototype = static_cast<PROTOTYPE *>(arg);
|
||||
@ -646,8 +643,8 @@ float StandardDeviation(PROTOTYPE *Proto, uint16_t Dimension) {
|
||||
* tree are the individual samples themselves; they have no
|
||||
* sub-clusters. The root node of the tree conceptually contains
|
||||
* all of the samples.
|
||||
* The Clusterer data structure is changed.
|
||||
* @param Clusterer data structure holdings samples to be clustered
|
||||
* @return None (the Clusterer data structure is changed)
|
||||
*/
|
||||
static void CreateClusterTree(CLUSTERER *Clusterer) {
|
||||
ClusteringContext context;
|
||||
@ -863,7 +860,6 @@ int32_t MergeClusters(int16_t N,
|
||||
* structure.
|
||||
* @param Clusterer data structure holding cluster tree
|
||||
* @param Config parameters used to control prototype generation
|
||||
* @return None
|
||||
*/
|
||||
static void ComputePrototypes(CLUSTERER* Clusterer, CLUSTERCONFIG* Config) {
|
||||
LIST ClusterStack = NIL_LIST;
|
||||
@ -1267,7 +1263,6 @@ static PROTOTYPE* MakeMixedProto(CLUSTERER* Clusterer,
|
||||
* @param i index of dimension to be changed
|
||||
* @param Proto prototype whose dimension is to be altered
|
||||
* @param ParamDesc description of specified dimension
|
||||
* @return None
|
||||
*/
|
||||
static void MakeDimRandom(uint16_t i, PROTOTYPE* Proto, PARAM_DESC* ParamDesc) {
|
||||
Proto->Distrib[i] = D_random;
|
||||
@ -1289,7 +1284,6 @@ static void MakeDimRandom(uint16_t i, PROTOTYPE* Proto, PARAM_DESC* ParamDesc) {
|
||||
* @param i index of dimension to be changed
|
||||
* @param Proto prototype whose dimension is to be altered
|
||||
* @param Statistics statistical info about prototype
|
||||
* @return None
|
||||
*/
|
||||
static void MakeDimUniform(uint16_t i, PROTOTYPE* Proto, STATISTICS* Statistics) {
|
||||
Proto->Distrib[i] = uniform;
|
||||
@ -1862,13 +1856,13 @@ static double Integral(double f1, double f2, double Dx) {
|
||||
* range and the StdDev is 1/2 the range. A dimension with
|
||||
* zero standard deviation cannot be statistically analyzed.
|
||||
* In this case, a pseudo-analysis is used.
|
||||
* The Buckets data structure is filled in.
|
||||
* @param Buckets histogram buckets to count samples
|
||||
* @param Cluster cluster whose samples are being analyzed
|
||||
* @param Dim dimension of samples which is being analyzed
|
||||
* @param ParamDesc description of the dimension
|
||||
* @param Mean "mean" of the distribution
|
||||
* @param StdDev "standard deviation" of the distribution
|
||||
* @return None (the Buckets data structure is filled in)
|
||||
*/
|
||||
static void FillBuckets(BUCKETS *Buckets,
|
||||
CLUSTER *Cluster,
|
||||
@ -2029,7 +2023,6 @@ static bool DistributionOK(BUCKETS* Buckets) {
|
||||
* This routine frees the memory used by the statistics
|
||||
* data structure.
|
||||
* @param Statistics pointer to data structure to be freed
|
||||
* @return None
|
||||
*/
|
||||
static void FreeStatistics(STATISTICS *Statistics) {
|
||||
free(Statistics->CoVariance);
|
||||
@ -2055,8 +2048,6 @@ static void FreeBuckets(BUCKETS *buckets) {
|
||||
* recursive calls to FreeCluster().
|
||||
*
|
||||
* @param Cluster pointer to cluster to be freed
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
static void FreeCluster(CLUSTER *Cluster) {
|
||||
if (Cluster != nullptr) {
|
||||
@ -2096,7 +2087,6 @@ static uint16_t DegreesOfFreedom(DISTRIBUTION Distribution, uint16_t HistogramBu
|
||||
* is now adjusted to the new sample count.
|
||||
* @param Buckets histogram data structure to adjust
|
||||
* @param NewSampleCount new sample count to adjust to
|
||||
* @return none
|
||||
*/
|
||||
static void AdjustBuckets(BUCKETS *Buckets, uint32_t NewSampleCount) {
|
||||
int i;
|
||||
@ -2117,7 +2107,6 @@ static void AdjustBuckets(BUCKETS *Buckets, uint32_t NewSampleCount) {
|
||||
* This routine sets the bucket counts in the specified histogram
|
||||
* to zero.
|
||||
* @param Buckets histogram data structure to init
|
||||
* @return none
|
||||
*/
|
||||
static void InitBuckets(BUCKETS *Buckets) {
|
||||
int i;
|
||||
@ -2156,7 +2145,7 @@ static int AlphaMatch(void *arg1, //CHISTRUCT *Ch
|
||||
*
|
||||
* @param DegreesOfFreedom degrees of freedom for new chi value
|
||||
* @param Alpha confidence level for new chi value
|
||||
* @return none
|
||||
* @return newly allocated data structure
|
||||
*/
|
||||
static CHISTRUCT *NewChiStruct(uint16_t DegreesOfFreedom, double Alpha) {
|
||||
CHISTRUCT *NewChiStruct;
|
||||
|
@ -77,8 +77,6 @@ static float *ReadNFloats(TFile *fp, uint16_t N, float Buffer[]) {
|
||||
* @param File open text file to write N floats to
|
||||
* @param N number of floats to write
|
||||
* @param Array array of floats to write
|
||||
* @return None
|
||||
* @note Globals: None
|
||||
*/
|
||||
static void WriteNFloats(FILE * File, uint16_t N, float Array[]) {
|
||||
for (int i = 0; i < N; i++)
|
||||
@ -92,8 +90,6 @@ static void WriteNFloats(FILE * File, uint16_t N, float Array[]) {
|
||||
* a carriage return to the end.
|
||||
* @param File open text file to write prototype style to
|
||||
* @param ProtoStyle prototype style to write
|
||||
* @return None
|
||||
* @note Globals: None
|
||||
*/
|
||||
static void WriteProtoStyle(FILE *File, PROTOSTYLE ProtoStyle) {
|
||||
switch (ProtoStyle) {
|
||||
@ -254,8 +250,6 @@ PROTOTYPE *ReadPrototype(TFile *fp, uint16_t N) {
|
||||
* @param File open text file to write param descriptors to
|
||||
* @param N number of param descriptors to write
|
||||
* @param ParamDesc array of param descriptors to write
|
||||
* @return None
|
||||
* @note Globals: None
|
||||
*/
|
||||
void WriteParamDesc(FILE *File, uint16_t N, const PARAM_DESC ParamDesc[]) {
|
||||
int i;
|
||||
@ -281,8 +275,6 @@ void WriteParamDesc(FILE *File, uint16_t N, const PARAM_DESC ParamDesc[]) {
|
||||
* @param File open text file to write prototype to
|
||||
* @param N number of dimensions in feature space
|
||||
* @param Proto prototype to write out
|
||||
* @return None
|
||||
* @note Globals: None
|
||||
*/
|
||||
void WritePrototype(FILE *File, uint16_t N, PROTOTYPE *Proto) {
|
||||
int i;
|
||||
|
@ -2,7 +2,6 @@
|
||||
** Filename: cutoffs.c
|
||||
** Purpose: Routines to manipulate an array of class cutoffs.
|
||||
** Author: Dan Johnson
|
||||
** History: Wed Feb 20 09:28:51 1991, DSJ, Created.
|
||||
**
|
||||
** (c) Copyright Hewlett-Packard Company, 1988.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -39,8 +38,6 @@ namespace tesseract {
|
||||
* array are set to an arbitrarily high cutoff value.
|
||||
* @param fp file containing cutoff definitions
|
||||
* @param Cutoffs array to put cutoffs into
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void Classify::ReadNewCutoffs(TFile* fp, CLASS_CUTOFF_ARRAY Cutoffs) {
|
||||
char Class[UNICHAR_LEN + 1];
|
||||
|
@ -39,8 +39,7 @@ float DistanceBetween(FPOINT A, FPOINT B) {
|
||||
* @param Point1 points to compute angle between
|
||||
* @param Point2 points to compute angle between
|
||||
* @param FullScale value to associate with 2*pi
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
* @return angle
|
||||
*/
|
||||
float NormalizedAngleFrom(FPOINT *Point1, FPOINT *Point2, float FullScale) {
|
||||
float NumRadsInCircle = 2.0 * M_PI;
|
||||
|
@ -96,7 +96,6 @@ namespace tesseract {
|
||||
* @param n Number of elements to sort
|
||||
* @param ra Key array [1..n]
|
||||
* @param rb Index array [1..n]
|
||||
* @return none
|
||||
*/
|
||||
static void
|
||||
HeapSort (int n, int ra[], int rb[]) {
|
||||
@ -508,7 +507,6 @@ int Classify::PruneClasses(const INT_TEMPLATES_STRUCT* int_templates,
|
||||
* param NormalizationFactor Fudge factor from blob normalization process
|
||||
* param Result Class rating & configuration: (0.0 -> 1.0), 0=bad, 1=good
|
||||
* param Debug Debugger flag: 1=debugger on
|
||||
* @return none
|
||||
*/
|
||||
void IntegerMatcher::Match(INT_CLASS ClassTemplate,
|
||||
BIT_VECTOR ProtoMask,
|
||||
@ -752,7 +750,6 @@ void ScratchEvidence::ClearFeatureEvidence(const INT_CLASS class_template) {
|
||||
|
||||
/**
|
||||
* Print debugging information for Configurations
|
||||
* @return none
|
||||
*/
|
||||
static void IMDebugConfiguration(int FeatureNum, uint16_t ActualProtoNum,
|
||||
uint8_t Evidence, uint32_t ConfigWord) {
|
||||
@ -770,7 +767,6 @@ static void IMDebugConfiguration(int FeatureNum, uint16_t ActualProtoNum,
|
||||
|
||||
/**
|
||||
* Print debugging information for Configurations
|
||||
* @return none
|
||||
*/
|
||||
static void IMDebugConfigurationSum(int FeatureNum, uint8_t *FeatureEvidence,
|
||||
int32_t ConfigCount) {
|
||||
@ -790,7 +786,7 @@ static void IMDebugConfigurationSum(int FeatureNum, uint8_t *FeatureEvidence,
|
||||
* @param Feature Pointer to a feature struct
|
||||
* @param tables Evidence tables
|
||||
* @param Debug Debugger flag: 1=debugger on
|
||||
* @return none
|
||||
* @return sum of feature evidence tables
|
||||
*/
|
||||
int IntegerMatcher::UpdateTablesForFeature(
|
||||
INT_CLASS ClassTemplate,
|
||||
@ -931,7 +927,6 @@ int IntegerMatcher::UpdateTablesForFeature(
|
||||
|
||||
/**
|
||||
* Print debugging information for Configurations
|
||||
* @return none
|
||||
*/
|
||||
#ifndef GRAPHICS_DISABLED
|
||||
void IntegerMatcher::DebugFeatureProtoError(
|
||||
|
@ -323,7 +323,6 @@ int AddIntProto(INT_CLASS Class) {
|
||||
* @param Proto floating-pt proto to add to class pruner
|
||||
* @param ClassId class id corresponding to Proto
|
||||
* @param Templates set of templates containing class pruner
|
||||
* @return none
|
||||
*/
|
||||
void AddProtoToClassPruner (PROTO Proto, CLASS_ID ClassId,
|
||||
INT_TEMPLATES Templates)
|
||||
@ -363,7 +362,6 @@ void AddProtoToClassPruner (PROTO Proto, CLASS_ID ClassId,
|
||||
* @param Class integer class that contains desired proto pruner
|
||||
* @param debug debug flag
|
||||
* @note Globals: none
|
||||
* @return none
|
||||
*/
|
||||
void AddProtoToProtoPruner(PROTO Proto, int ProtoId,
|
||||
INT_CLASS Class, bool debug) {
|
||||
@ -444,7 +442,6 @@ uint8_t CircBucketFor(float param, float offset, int num_buckets) {
|
||||
* Globals:
|
||||
* - FeatureShapes display list for features
|
||||
* - ProtoShapes display list for protos
|
||||
* @return none
|
||||
*/
|
||||
void UpdateMatchDisplay() {
|
||||
if (IntMatchWindow != nullptr)
|
||||
@ -461,8 +458,6 @@ void UpdateMatchDisplay() {
|
||||
* @param Config config to be added to class
|
||||
* @param ConfigId id to be used for new config
|
||||
* @param Class class to add new config to
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void ConvertConfig(BIT_VECTOR Config, int ConfigId, INT_CLASS Class) {
|
||||
int ProtoId;
|
||||
@ -488,8 +483,6 @@ namespace tesseract {
|
||||
* @param Proto floating-pt proto to be converted to integer format
|
||||
* @param ProtoId id of proto
|
||||
* @param Class integer class to add converted proto to
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void Classify::ConvertProto(PROTO Proto, int ProtoId, INT_CLASS Class) {
|
||||
INT_PROTO P;
|
||||
@ -592,7 +585,6 @@ INT_TEMPLATES Classify::CreateIntTemplates(CLASSES FloatProtos,
|
||||
* - FeatureShapes global display list for features
|
||||
* @param Feature pico-feature to be displayed
|
||||
* @param Evidence best evidence for this feature (0-1)
|
||||
* @return none
|
||||
*/
|
||||
void DisplayIntFeature(const INT_FEATURE_STRUCT *Feature, float Evidence) {
|
||||
ScrollView::Color color = GetMatchColorFor(Evidence);
|
||||
@ -611,7 +603,6 @@ void DisplayIntFeature(const INT_FEATURE_STRUCT *Feature, float Evidence) {
|
||||
* @param Class class to take proto from
|
||||
* @param ProtoId id of proto in Class to be displayed
|
||||
* @param Evidence total evidence for proto (0-1)
|
||||
* @return none
|
||||
*/
|
||||
void DisplayIntProto(INT_CLASS Class, PROTO_ID ProtoId, float Evidence) {
|
||||
ScrollView::Color color = GetMatchColorFor(Evidence);
|
||||
@ -966,7 +957,6 @@ INT_TEMPLATES Classify::ReadIntTemplates(TFile *fp) {
|
||||
* Globals:
|
||||
* - FeatureShapes display list containing feature matches
|
||||
* - ProtoShapes display list containing proto matches
|
||||
* @return none
|
||||
*/
|
||||
void Classify::ShowMatchDisplay() {
|
||||
InitIntMatchWindowIfReqd();
|
||||
@ -1022,8 +1012,6 @@ void ClearFeatureSpaceWindow(NORM_METHOD norm_method, ScrollView* window) {
|
||||
* @param File open file to write templates to
|
||||
* @param Templates templates to save into File
|
||||
* @param target_unicharset the UNICHARSET to use
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void Classify::WriteIntTemplates(FILE *File, INT_TEMPLATES Templates,
|
||||
const UNICHARSET& target_unicharset) {
|
||||
@ -1129,8 +1117,6 @@ float BucketEnd(int Bucket, float Offset, int NumBuckets) {
|
||||
* @param ClassMask indicates which bits to change in each word
|
||||
* @param ClassCount indicates what to change bits to
|
||||
* @param WordIndex indicates which word to change
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void DoFill(FILL_SPEC *FillSpec,
|
||||
CLASS_PRUNER_STRUCT* Pruner,
|
||||
@ -1193,8 +1179,6 @@ bool FillerDone(TABLE_FILLER* Filler) {
|
||||
* @param Center center of filled area
|
||||
* @param Spread spread of filled area
|
||||
* @param debug debug flag
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void FillPPCircularBits(uint32_t ParamTable[NUM_PP_BUCKETS][WERDS_PER_PP_VECTOR],
|
||||
int Bit, float Center, float Spread, bool debug) {
|
||||
@ -1234,8 +1218,6 @@ void FillPPCircularBits(uint32_t ParamTable[NUM_PP_BUCKETS][WERDS_PER_PP_VECTOR]
|
||||
* @param Center center of filled area
|
||||
* @param Spread spread of filled area
|
||||
* @param debug debug flag
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void FillPPLinearBits(uint32_t ParamTable[NUM_PP_BUCKETS][WERDS_PER_PP_VECTOR],
|
||||
int Bit, float Center, float Spread, bool debug) {
|
||||
@ -1344,8 +1326,6 @@ CLASS_ID Classify::GetClassToDebug(const char *Prompt, bool* adaptive_on,
|
||||
* @param EndPad place to put end pad for Level
|
||||
* @param SidePad place to put side pad for Level
|
||||
* @param AnglePad place to put angle pad for Level
|
||||
* @return none (results are returned in EndPad, SidePad, and AnglePad.
|
||||
* @note Globals: none
|
||||
*/
|
||||
void GetCPPadsForLevel(int Level,
|
||||
float *EndPad,
|
||||
@ -1407,8 +1387,6 @@ ScrollView::Color GetMatchColorFor(float Evidence) {
|
||||
* do not run past the end of the fill table.
|
||||
* @param Filler filler to get next fill spec from
|
||||
* @param Fill place to put spec for next fill
|
||||
* @return none (results are returned in Fill)
|
||||
* @note Globals: none
|
||||
*/
|
||||
void GetNextFill(TABLE_FILLER *Filler, FILL_SPEC *Fill) {
|
||||
FILL_SWITCH *Next;
|
||||
@ -1451,14 +1429,11 @@ void GetNextFill(TABLE_FILLER *Filler, FILL_SPEC *Fill) {
|
||||
/**
|
||||
* This routine computes a data structure (Filler)
|
||||
* which can be used to fill in a rectangle surrounding
|
||||
* the specified Proto.
|
||||
* the specified Proto. Results are returned in Filler.
|
||||
*
|
||||
* @param EndPad, SidePad, AnglePad padding to add to proto
|
||||
* @param Proto proto to create a filler for
|
||||
* @param Filler place to put table filler
|
||||
*
|
||||
* @return none (results are returned in Filler)
|
||||
* @note Globals: none
|
||||
*/
|
||||
void InitTableFiller (float EndPad, float SidePad,
|
||||
float AnglePad, PROTO Proto, TABLE_FILLER * Filler)
|
||||
|
@ -327,7 +327,6 @@ void KDWalk(KDTREE *Tree, void_proc action, void *context) {
|
||||
* which are pointed to by the nodes. This memory is left
|
||||
* untouched.
|
||||
* @param Tree tree data structure to be released
|
||||
* @return none
|
||||
*/
|
||||
void FreeKDTree(KDTREE *Tree) {
|
||||
FreeSubTree(Tree->Root.Left);
|
||||
|
@ -2,7 +2,6 @@
|
||||
** Filename: mfdefs.cpp
|
||||
** Purpose: Basic routines for manipulating micro-features
|
||||
** Author: Dan Johnson
|
||||
** History: Mon Jan 22 08:48:58 1990, DSJ, Created.
|
||||
**
|
||||
** (c) Copyright Hewlett-Packard Company, 1988.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -25,7 +24,7 @@
|
||||
/*----------------------------------------------------------------------------
|
||||
Public Code
|
||||
----------------------------------------------------------------------------**/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* This routine allocates and returns a new micro-feature
|
||||
* data structure.
|
||||
@ -35,13 +34,10 @@ MICROFEATURE NewMicroFeature() {
|
||||
return (static_cast<MICROFEATURE>(Emalloc (sizeof (MFBLOCK))));
|
||||
} /* NewMicroFeature */
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* This routine deallocates all of the memory consumed by
|
||||
* a list of micro-features.
|
||||
* @param MicroFeatures list of micro-features to be freed
|
||||
* @return none
|
||||
*/
|
||||
void FreeMicroFeatures(MICROFEATURES MicroFeatures) {
|
||||
destroy_nodes(MicroFeatures, Efree);
|
||||
|
@ -2,7 +2,6 @@
|
||||
** Filename: mfoutline.c
|
||||
** Purpose: Interface to outline struct used for extracting features
|
||||
** Author: Dan Johnson
|
||||
** History: Thu May 17 08:14:18 1990, DSJ, Created.
|
||||
**
|
||||
** (c) Copyright Hewlett-Packard Company, 1988.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -112,7 +111,6 @@ LIST ConvertOutlines(TESSLINE *outline,
|
||||
* @param Outline micro-feature outline to analyze
|
||||
* @param MinSlope controls "snapping" of segments to horizontal
|
||||
* @param MaxSlope controls "snapping" of segments to vertical
|
||||
* @return none
|
||||
*/
|
||||
void FindDirectionChanges(MFOUTLINE Outline,
|
||||
float MinSlope,
|
||||
@ -144,7 +142,6 @@ void FindDirectionChanges(MFOUTLINE Outline,
|
||||
* This routine deallocates all of the memory consumed by
|
||||
* a micro-feature outline.
|
||||
* @param arg micro-feature outline to be freed
|
||||
* @return none
|
||||
*/
|
||||
void FreeMFOutline(void *arg) { //MFOUTLINE Outline)
|
||||
MFOUTLINE Start;
|
||||
@ -166,7 +163,6 @@ void FreeMFOutline(void *arg) { //MFOUTLINE Outline
|
||||
* Release all memory consumed by the specified list
|
||||
* of outlines.
|
||||
* @param Outlines list of mf-outlines to be freed
|
||||
* @return none
|
||||
*/
|
||||
void FreeOutlines(LIST Outlines) {
|
||||
destroy_nodes(Outlines, FreeMFOutline);
|
||||
@ -183,8 +179,6 @@ void FreeOutlines(LIST Outlines) {
|
||||
* changes rather than at the midpoint between direction
|
||||
* changes.
|
||||
* @param Outline micro-feature outline to analyze
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void MarkDirectionChanges(MFOUTLINE Outline) {
|
||||
MFOUTLINE Current;
|
||||
@ -244,8 +238,6 @@ MFOUTLINE NextExtremity(MFOUTLINE EdgePoint) {
|
||||
* y coordinate of the baseline is 0.
|
||||
* @param Outline outline to be normalized
|
||||
* @param XOrigin x-origin of text
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void NormalizeOutline(MFOUTLINE Outline,
|
||||
float XOrigin) {
|
||||
@ -272,6 +264,7 @@ namespace tesseract {
|
||||
* scaling. The scale factors returned represent the x and
|
||||
* y sizes in the normalized coordinate system that correspond
|
||||
* to 1 pixel in the original coordinate system.
|
||||
* Outlines are changed and XScale and YScale are updated.
|
||||
*
|
||||
* Globals:
|
||||
* - classify_norm_method method being used for normalization
|
||||
@ -279,7 +272,6 @@ namespace tesseract {
|
||||
* @param Outlines list of outlines to be normalized
|
||||
* @param XScale x-direction scale factor used by routine
|
||||
* @param YScale y-direction scale factor used by routine
|
||||
* @return none (Outlines are changed and XScale and YScale are updated)
|
||||
*/
|
||||
void Classify::NormalizeOutlines(LIST Outlines,
|
||||
float *XScale,
|
||||
@ -313,8 +305,6 @@ void Classify::NormalizeOutlines(LIST Outlines,
|
||||
* change in direction of the point before it.
|
||||
* @param Start, End defines segment of outline to be modified
|
||||
* @param Direction new direction to assign to segment
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void ChangeDirection(MFOUTLINE Start, MFOUTLINE End, DIRECTION Direction) {
|
||||
MFOUTLINE Current;
|
||||
@ -332,8 +322,6 @@ void ChangeDirection(MFOUTLINE Start, MFOUTLINE End, DIRECTION Direction) {
|
||||
* anisotropically according to the given scale factors.
|
||||
* @param Outline outline to be character normalized
|
||||
* @param cn_denorm
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void CharNormalizeOutline(MFOUTLINE Outline, const DENORM& cn_denorm) {
|
||||
MFOUTLINE First, Current;
|
||||
@ -371,8 +359,6 @@ void CharNormalizeOutline(MFOUTLINE Outline, const DENORM& cn_denorm) {
|
||||
* @param Finish finishing point to compute direction to
|
||||
* @param MinSlope slope below which lines are horizontal
|
||||
* @param MaxSlope slope above which lines are vertical
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void ComputeDirection(MFEDGEPT *Start,
|
||||
MFEDGEPT *Finish,
|
||||
|
@ -50,7 +50,6 @@ bool AddFeature(FEATURE_SET FeatureSet, FEATURE Feature) {
|
||||
/**
|
||||
* Release the memory consumed by the specified feature.
|
||||
* @param Feature feature to be deallocated.
|
||||
* @return none
|
||||
*/
|
||||
void FreeFeature(FEATURE Feature) { free(Feature); } /* FreeFeature */
|
||||
|
||||
@ -59,7 +58,6 @@ void FreeFeature(FEATURE Feature) { free(Feature); } /* FreeFeature */
|
||||
* set. This routine also frees the memory consumed by the
|
||||
* features contained in the set.
|
||||
* @param FeatureSet set of features to be freed
|
||||
* @return none
|
||||
*/
|
||||
void FreeFeatureSet(FEATURE_SET FeatureSet) {
|
||||
int i;
|
||||
@ -160,7 +158,6 @@ FEATURE_SET ReadFeatureSet(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc) {
|
||||
* feature type information is specified or assumed elsewhere.
|
||||
* @param Feature feature to write out to str
|
||||
* @param str string to write Feature to
|
||||
* @return none
|
||||
*/
|
||||
void WriteFeature(FEATURE Feature, STRING* str) {
|
||||
for (int i = 0; i < Feature->Type->NumParams; i++) {
|
||||
@ -179,7 +176,6 @@ void WriteFeature(FEATURE Feature, STRING* str) {
|
||||
* text representations for each feature in the set.
|
||||
* @param FeatureSet feature set to write to File
|
||||
* @param str string to write Feature to
|
||||
* @return none
|
||||
*/
|
||||
void WriteFeatureSet(FEATURE_SET FeatureSet, STRING* str) {
|
||||
if (FeatureSet) {
|
||||
|
@ -2,7 +2,6 @@
|
||||
** Filename: outfeat.c
|
||||
** Purpose: Definition of outline-features.
|
||||
** Author: Dan Johnson
|
||||
** History: 11/13/90, DSJ, Created.
|
||||
**
|
||||
** (c) Copyright Hewlett-Packard Company, 1988.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -80,8 +79,6 @@ FEATURE_SET Classify::ExtractOutlineFeatures(TBLOB *Blob) {
|
||||
* @param Start starting point of outline-feature
|
||||
* @param End ending point of outline-feature
|
||||
* @param FeatureSet set to add outline-feature to
|
||||
* @return none (results are placed in FeatureSet)
|
||||
* @note Globals: none
|
||||
*/
|
||||
void AddOutlineFeatureToSet(FPOINT *Start,
|
||||
FPOINT *End,
|
||||
@ -103,10 +100,9 @@ void AddOutlineFeatureToSet(FPOINT *Start,
|
||||
* This routine steps converts each section in the specified
|
||||
* outline to a feature described by its x,y position, length
|
||||
* and angle.
|
||||
* Results are returned in FeatureSet.
|
||||
* @param Outline outline to extract outline-features from
|
||||
* @param FeatureSet set of features to add outline-features to
|
||||
* @return none (results are returned in FeatureSet)
|
||||
* @note Globals: none
|
||||
*/
|
||||
void ConvertToOutlineFeatures(MFOUTLINE Outline, FEATURE_SET FeatureSet) {
|
||||
MFOUTLINE Next;
|
||||
@ -143,9 +139,8 @@ void ConvertToOutlineFeatures(MFOUTLINE Outline, FEATURE_SET FeatureSet) {
|
||||
* over all of the outline-features in FeatureSet and then
|
||||
* renormalizes the outline-features to force this average
|
||||
* to be the x origin (i.e. x=0).
|
||||
* FeatureSet is changed.
|
||||
* @param FeatureSet outline-features to be normalized
|
||||
* @return none (FeatureSet is changed)
|
||||
* @note Globals: none
|
||||
*/
|
||||
void NormalizeOutlineX(FEATURE_SET FeatureSet) {
|
||||
int i;
|
||||
|
@ -2,7 +2,6 @@
|
||||
** Filename: picofeat.c
|
||||
** Purpose: Definition of pico-features.
|
||||
** Author: Dan Johnson
|
||||
** History: 9/4/90, DSJ, Created.
|
||||
**
|
||||
** (c) Copyright Hewlett-Packard Company, 1988.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -94,12 +93,12 @@ FEATURE_SET Classify::ExtractPicoFeatures(TBLOB *Blob) {
|
||||
* FeatureSet. The length of the segment is rounded to the
|
||||
* nearest whole number of pico-features. The pico-features
|
||||
* are spaced evenly over the entire segment.
|
||||
* Results are placed in FeatureSet.
|
||||
* Globals:
|
||||
* - classify_pico_feature_length length of a single pico-feature
|
||||
* @param Start starting point of pico-feature
|
||||
* @param End ending point of pico-feature
|
||||
* @param FeatureSet set to add pico-feature to
|
||||
* @return none (results are placed in FeatureSet)
|
||||
*/
|
||||
void ConvertSegmentToPicoFeat(FPOINT *Start,
|
||||
FPOINT *End,
|
||||
@ -146,12 +145,12 @@ void ConvertSegmentToPicoFeat(FPOINT *Start,
|
||||
* up into pieces of equal length. These pieces become the
|
||||
* desired pico-features. Each segment in the outline
|
||||
* is converted into an integral number of pico-features.
|
||||
* Results are returned in FeatureSet.
|
||||
*
|
||||
* Globals:
|
||||
* - classify_pico_feature_length length of features to be extracted
|
||||
* @param Outline outline to extract micro-features from
|
||||
* @param FeatureSet set of features to add pico-features to
|
||||
* @return none (results are returned in FeatureSet)
|
||||
*/
|
||||
void ConvertToPicoFeatures2(MFOUTLINE Outline, FEATURE_SET FeatureSet) {
|
||||
MFOUTLINE Next;
|
||||
@ -188,9 +187,8 @@ void ConvertToPicoFeatures2(MFOUTLINE Outline, FEATURE_SET FeatureSet) {
|
||||
* of the pico-features in FeatureSet and then renormalizes
|
||||
* the pico-features to force this average to be the x origin
|
||||
* (i.e. x=0).
|
||||
* FeatureSet is changed.
|
||||
* @param FeatureSet pico-features to be normalized
|
||||
* @return none (FeatureSet is changed)
|
||||
* @note Globals: none
|
||||
*/
|
||||
void NormalizePicoX(FEATURE_SET FeatureSet) {
|
||||
int i;
|
||||
|
@ -106,8 +106,7 @@ CLUSTERCONFIG CNConfig =
|
||||
* N samples of each class should be used.
|
||||
* @param argc number of command line arguments
|
||||
* @param argv array of command line arguments
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
* @return 0 on success
|
||||
*/
|
||||
int main(int argc, char *argv[]) {
|
||||
tesseract::CheckSharedLibraryVersion();
|
||||
@ -200,7 +199,6 @@ int main(int argc, char *argv[]) {
|
||||
* @param Directory directory to place sample files into
|
||||
* @param LabeledProtoList List of labeled protos
|
||||
* @param feature_desc Description of the features
|
||||
* @return none
|
||||
*/
|
||||
static void WriteNormProtos(const char *Directory, LIST LabeledProtoList,
|
||||
const FEATURE_DESC_STRUCT *feature_desc) {
|
||||
|
@ -44,7 +44,6 @@ STRING_PARAM_FLAG(test_ch, "", "UTF8 test character string");
|
||||
* - Config current clustering parameters
|
||||
* @param argc number of command line arguments to parse
|
||||
* @param argv command line arguments
|
||||
* @return none
|
||||
* @note Exceptions: Illegal options terminate the program.
|
||||
*/
|
||||
void ParseArguments(int* argc, char ***argv) {
|
||||
@ -124,7 +123,6 @@ DOUBLE_PARAM_FLAG(clusterconfig_confidence, Config.Confidence,
|
||||
* - Config current clustering parameters
|
||||
* @param argc number of command line arguments to parse
|
||||
* @param argv command line arguments
|
||||
* @return none
|
||||
*/
|
||||
void ParseArguments(int* argc, char ***argv) {
|
||||
STRING usage;
|
||||
@ -392,8 +390,6 @@ LABELEDLIST NewLabeledList(const char* Label) {
|
||||
* @param max_samples
|
||||
* @param unicharset
|
||||
* @param training_samples
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void ReadTrainingSamples(const FEATURE_DEFS_STRUCT& feature_definitions,
|
||||
const char *feature_name, int max_samples,
|
||||
@ -455,8 +451,6 @@ void ReadTrainingSamples(const FEATURE_DEFS_STRUCT& feature_definitions,
|
||||
* This routine deallocates all of the space allocated to
|
||||
* the specified list of training samples.
|
||||
* @param CharList list of all fonts in document
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void FreeTrainingSamples(LIST CharList) {
|
||||
LABELEDLIST char_sample;
|
||||
@ -483,7 +477,6 @@ void FreeTrainingSamples(LIST CharList) {
|
||||
* consumed by the items in the list.
|
||||
* @param LabeledList labeled list to be freed
|
||||
* @note Globals: none
|
||||
* @return none
|
||||
*/
|
||||
void FreeLabeledList(LABELEDLIST LabeledList) {
|
||||
destroy(LabeledList->List);
|
||||
@ -717,8 +710,6 @@ MERGE_CLASS NewLabeledClass(const char* Label) {
|
||||
* This routine deallocates all of the space allocated to
|
||||
* the specified list of training samples.
|
||||
* @param ClassList list of all fonts in document
|
||||
* @return none
|
||||
* @note Globals: none
|
||||
*/
|
||||
void FreeLabeledClassList(LIST ClassList) {
|
||||
MERGE_CLASS MergeClass;
|
||||
|
@ -116,10 +116,6 @@ float CompareProtos(PROTO p1, PROTO p2) {
|
||||
* @param p1, p2 protos to be merged
|
||||
* @param w1, w2 weight of each proto
|
||||
* @param MergedProto place to put resulting merged proto
|
||||
*
|
||||
* Globals: none
|
||||
*
|
||||
* @return none (results are returned in MergedProto)
|
||||
*/
|
||||
void ComputeMergedProto (PROTO p1,
|
||||
PROTO p2,
|
||||
@ -290,10 +286,6 @@ bool DummyFastMatch(FEATURE Feature, PROTO Proto)
|
||||
* @param TangentPad amount of pad to add in direction of segment
|
||||
* @param OrthogonalPad amount of pad to add orthogonal to segment
|
||||
* @param[out] BoundingBox place to put results
|
||||
*
|
||||
* Globals: none
|
||||
*
|
||||
* @return none (results are returned in BoundingBox)
|
||||
*/
|
||||
void ComputePaddedBoundingBox (PROTO Proto, float TangentPad,
|
||||
float OrthogonalPad, FRECT *BoundingBox) {
|
||||
|
Loading…
Reference in New Issue
Block a user