#include <devanagari_processing.h>
Definition at line 35 of file devanagari_processing.h.
◆ PixelHistogram()
tesseract::PixelHistogram::PixelHistogram |
( |
| ) |
|
|
inline |
◆ ~PixelHistogram()
tesseract::PixelHistogram::~PixelHistogram |
( |
| ) |
|
|
inline |
◆ Clear()
void tesseract::PixelHistogram::Clear |
( |
| ) |
|
|
inline |
◆ ConstructHorizontalCountHist()
void tesseract::PixelHistogram::ConstructHorizontalCountHist |
( |
Pix * |
pix | ) |
|
Definition at line 489 of file devanagari_processing.cpp.
491 Numa* counts = pixCountPixelsByRow(pix, NULL);
492 length_ = numaGetCount(counts);
493 hist_ =
new int[length_];
494 for (
int i = 0; i < length_; ++i) {
496 numaGetIValue(counts, i, &val);
499 numaDestroy(&counts);
◆ ConstructVerticalCountHist()
void tesseract::PixelHistogram::ConstructVerticalCountHist |
( |
Pix * |
pix | ) |
|
Definition at line 471 of file devanagari_processing.cpp.
473 int width = pixGetWidth(pix);
474 int height = pixGetHeight(pix);
475 hist_ =
new int[width];
477 int wpl = pixGetWpl(pix);
478 l_uint32 *data = pixGetData(pix);
479 for (
int i = 0; i < width; ++i)
481 for (
int i = 0; i < height; ++i) {
482 l_uint32 *line = data + i * wpl;
483 for (
int j = 0; j < width; ++j)
484 if (GET_DATA_BIT(line, j))
◆ GetHistogramMaximum()
int tesseract::PixelHistogram::GetHistogramMaximum |
( |
int * |
count | ) |
const |
Definition at line 457 of file devanagari_processing.cpp.
459 for (
int i = 0; i < length_; ++i) {
460 if (hist_[i] > hist_[best_value]) {
465 *
count = hist_[best_value];
◆ hist()
int* tesseract::PixelHistogram::hist |
( |
| ) |
const |
|
inline |
◆ length()
int tesseract::PixelHistogram::length |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: