The class binarize a grayvalue image. The segmentation algorithm is based on "Binarization of Historical Document Images Using Local Maximum and Minimum", Bolan Su, Shijian Lu and Chew Lim Tan, DAS 2010. In contrast to DkSegmentationSu the ContrastImg is adapted and the strokeWidth is constant.
More...
#include <Binarization.h>
|
float | setStrokeWidth (float strokeW) |
|
virtual float | thresholdVal (float *mean, float *std) const |
|
virtual float | contrastVal (const unsigned char *maxVal, const unsigned char *minVal) const override |
|
virtual void | calcFilterParams (int &filterS, int &Nm) override |
|
cv::Mat | compContrastImg (const cv::Mat &srcImg, const cv::Mat &mask) const |
|
cv::Mat | compBinContrastImg (const cv::Mat &contrastImg) const |
|
virtual float | strokeWidth (const cv::Mat &contrastImg) const |
|
void | computeDistHist (const cv::Mat &src, QList< int > *maxDiffList, QList< float > *localIntensity) const |
|
void | computeThrImg (const cv::Mat &grayImg32F, const cv::Mat &binContrast, cv::Mat &thresholdImg, cv::Mat &thresholdContrastPxImg) |
|
bool | checkInput () const override |
|
QString | debugName () const |
|
The class binarize a grayvalue image. The segmentation algorithm is based on "Binarization of Historical Document Images Using Local Maximum and Minimum", Bolan Su, Shijian Lu and Chew Lim Tan, DAS 2010. In contrast to DkSegmentationSu the ContrastImg is adapted and the strokeWidth is constant.
- See also
- BaseBinarizationSu
rdf::BinarizationSuAdapted::BinarizationSuAdapted |
( |
const cv::Mat & |
img, |
|
|
const cv::Mat & |
mask = cv::Mat() |
|
) |
| |
Initializes a new instance of the BinarizationSuAdapted class.
- Parameters
-
img | The source img CV_8U. |
mask | The optional mask CV_8UC1. |
void rdf::BinarizationSuAdapted::calcFilterParams |
( |
int & |
filterS, |
|
|
int & |
Nm |
|
) |
| |
|
overrideprotectedvirtual |
bool rdf::BinarizationSuAdapted::compute |
( |
| ) |
|
|
overridevirtual |
float rdf::BinarizationSuAdapted::contrastVal |
( |
const unsigned char * |
maxVal, |
|
|
const unsigned char * |
minVal |
|
) |
| const |
|
overrideprotectedvirtual |
void rdf::BinarizationSuAdapted::setFiltering |
( |
bool |
medianFilter | ) |
|
If set, a median filter of size 3 is applied at the end.
- Parameters
-
medianFilter | if set to true [median filter] with size 3 is applied. |
float rdf::BinarizationSuAdapted::setStrokeWidth |
( |
float |
strokeW | ) |
|
|
protected |
float rdf::BinarizationSuAdapted::thresholdVal |
( |
float * |
mean, |
|
|
float * |
std |
|
) |
| const |
|
inlineprotectedvirtual |
QString rdf::BinarizationSuAdapted::toString |
( |
| ) |
const |
|
overridevirtual |
cv::Mat rdf::BinarizationSuAdapted::mBinContrastImg |
|
protected |
cv::Mat rdf::BinarizationSuAdapted::mContrastImg |
|
protected |
cv::Mat rdf::BinarizationSuAdapted::mThrImg |
|
protected |
The documentation for this class was generated from the following files: