Tesseract
3.02
|
#include <feature_hybrid.h>
Public Member Functions | |
FeatureHybrid (TuningParams *params) | |
virtual | ~FeatureHybrid () |
virtual CharSamp * | ComputeFeatureBitmap (CharSamp *samp) |
virtual bool | ComputeFeatures (CharSamp *samp, float *features) |
virtual int | FeatureCnt () |
Protected Attributes | |
FeatureBmp * | feature_bmp_ |
FeatureChebyshev * | feature_chebyshev_ |
Definition at line 33 of file feature_hybrid.h.
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_; }
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(); }
FeatureBmp* tesseract::FeatureHybrid::feature_bmp_ [protected] |
Definition at line 51 of file feature_hybrid.h.
Definition at line 52 of file feature_hybrid.h.