#include <devanagari_processing.h>
Definition at line 27 of file devanagari_processing.h.
| tesseract::PixelHistogram::PixelHistogram |
( |
| ) |
|
|
inline |
| tesseract::PixelHistogram::~PixelHistogram |
( |
| ) |
|
|
inline |
| void tesseract::PixelHistogram::Clear |
( |
| ) |
|
|
inline |
| void tesseract::PixelHistogram::ConstructHorizontalCountHist |
( |
Pix * |
pix | ) |
|
Definition at line 486 of file devanagari_processing.cpp.
488 Numa* counts = pixCountPixelsByRow(pix,
NULL);
489 length_ = numaGetCount(counts);
490 hist_ =
new int[length_];
491 for (
int i = 0; i < length_; ++i) {
493 numaGetIValue(counts, i, &val);
496 numaDestroy(&counts);
| void tesseract::PixelHistogram::ConstructVerticalCountHist |
( |
Pix * |
pix | ) |
|
Definition at line 468 of file devanagari_processing.cpp.
470 int width = pixGetWidth(pix);
471 int height = pixGetHeight(pix);
472 hist_ =
new int[width];
474 int wpl = pixGetWpl(pix);
475 l_uint32 *data = pixGetData(pix);
476 for (
int i = 0; i < width; ++i)
478 for (
int i = 0; i < height; ++i) {
479 l_uint32 *line = data + i * wpl;
480 for (
int j = 0; j < width; ++j)
481 if (GET_DATA_BIT(line, j))
| int tesseract::PixelHistogram::GetHistogramMaximum |
( |
int * |
count | ) |
const |
Definition at line 454 of file devanagari_processing.cpp.
456 for (
int i = 0; i < length_; ++i) {
457 if (hist_[i] > hist_[best_value]) {
462 *
count = hist_[best_value];
| int* const tesseract::PixelHistogram::hist |
( |
| ) |
const |
|
inline |
| int tesseract::PixelHistogram::length |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: