Tesseract  3.02
tesseract::FeatureHybrid Class Reference

#include <feature_hybrid.h>

Inheritance diagram for tesseract::FeatureHybrid:
tesseract::FeatureBase

List of all members.

Public Member Functions

 FeatureHybrid (TuningParams *params)
virtual ~FeatureHybrid ()
virtual CharSampComputeFeatureBitmap (CharSamp *samp)
virtual bool ComputeFeatures (CharSamp *samp, float *features)
virtual int FeatureCnt ()

Protected Attributes

FeatureBmpfeature_bmp_
FeatureChebyshevfeature_chebyshev_

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

Definition at line 51 of file feature_hybrid.h.


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