#include <devanagari_processing.h>
Definition at line 36 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 487 of file devanagari_processing.cpp.
489 Numa* counts = pixCountPixelsByRow(pix,
nullptr);
490 length_ = numaGetCount(counts);
491 hist_ =
new int[length_];
492 for (
int i = 0; i < length_; ++i) {
494 numaGetIValue(counts, i, &val);
497 numaDestroy(&counts);
◆ ConstructVerticalCountHist()
void tesseract::PixelHistogram::ConstructVerticalCountHist |
( |
Pix * |
pix | ) |
|
Definition at line 469 of file devanagari_processing.cpp.
471 int width = pixGetWidth(pix);
472 int height = pixGetHeight(pix);
473 hist_ =
new int[width];
475 int wpl = pixGetWpl(pix);
476 l_uint32 *data = pixGetData(pix);
477 for (
int i = 0; i < width; ++i)
479 for (
int i = 0; i < height; ++i) {
480 l_uint32 *line = data + i * wpl;
481 for (
int j = 0; j < width; ++j)
482 if (GET_DATA_BIT(line, j))
◆ GetHistogramMaximum()
int tesseract::PixelHistogram::GetHistogramMaximum |
( |
int * |
count | ) |
const |
Definition at line 455 of file devanagari_processing.cpp.
457 for (
int i = 0; i < length_; ++i) {
458 if (hist_[i] > hist_[best_value]) {
463 *
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: