Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes
tesseract::FeatureHybrid Class Reference

`#include <feature_hybrid.h>`

Inheritance diagram for tesseract::FeatureHybrid:

List of all members.

## Public Member Functions

| FeatureHybrid (TuningParams *params)
virtual | ~FeatureHybrid ()
virtual CharSamp * | ComputeFeatureBitmap (CharSamp *samp)
virtual bool | ComputeFeatures (CharSamp *samp, float *features)
virtual int | FeatureCnt ()
Public Member Functions inherited from tesseract::FeatureBase
| FeatureBase (TuningParams *params)
virtual | ~FeatureBase ()

## Protected Attributes

FeatureBmp * | feature_bmp_
FeatureChebyshev * | feature_chebyshev_
Protected Attributes inherited from tesseract::FeatureBase
TuningParams * | params_

## Detailed Description

Definition at line 33 of file feature_hybrid.h.

## Constructor & Destructor Documentation

tesseract::FeatureHybrid::FeatureHybrid | ( | TuningParams * | params | ) |

explicit

Definition at line 34 of file feature_hybrid.cpp.

:FeatureBase(params) {
feature_bmp_ = new FeatureBmp(params);
feature_chebyshev_ = new FeatureChebyshev(params);
}

tesseract::FeatureHybrid::~FeatureHybrid | ( |  | ) |

virtual

Definition at line 40 of file feature_hybrid.cpp.

{
delete feature_bmp_;
delete feature_chebyshev_;
}

## Member Function Documentation

CharSamp * tesseract::FeatureHybrid::ComputeFeatureBitmap | ( | CharSamp * | samp | ) |

virtual

Implements tesseract::FeatureBase.

Definition at line 47 of file feature_hybrid.cpp.

{
return char_samp;
}

bool tesseract::FeatureHybrid::ComputeFeatures | ( | CharSamp * | samp,
|  | float * | features
| ) |  |

virtual

Implements tesseract::FeatureBase.

Definition at line 53 of file feature_hybrid.cpp.

{
if (feature_bmp_ == NULL || feature_chebyshev_ == NULL) {
return false;
}
if (!feature_bmp_->ComputeFeatures(char_samp, features)) {
return false;
}
return feature_chebyshev_->ComputeFeatures(char_samp,
features + feature_bmp_->FeatureCnt());
}

virtual int tesseract::FeatureHybrid::FeatureCnt | ( |  | ) |

inline virtual

Implements tesseract::FeatureBase.

Definition at line 43 of file feature_hybrid.h.

{
if (feature_bmp_ == NULL || feature_chebyshev_ == NULL) {
return 0;
}
return feature_bmp_->FeatureCnt() + feature_chebyshev_->FeatureCnt();
}

## Member Data Documentation

FeatureBmp* tesseract::FeatureHybrid::feature_bmp_

protected

Definition at line 51 of file feature_hybrid.h.

FeatureChebyshev* tesseract::FeatureHybrid::feature_chebyshev_

protected

Definition at line 52 of file feature_hybrid.h.

The documentation for this class was generated from the following files:

- /mnt/data/src/tesseract-ocr/cube/feature_hybrid.h
- /mnt/data/src/tesseract-ocr/cube/feature_hybrid.cpp