#include <devanagari_processing.h>
Definition at line 33 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 |
( |
Image |
pix | ) |
|
Definition at line 474 of file devanagari_processing.cpp.
476 Numa *counts = pixCountPixelsByRow(pix,
nullptr);
477 length_ = numaGetCount(counts);
478 hist_ =
new int[length_];
479 for (
int i = 0; i < length_; ++i) {
481 numaGetIValue(counts, i, &val);
484 numaDestroy(&counts);
◆ ConstructVerticalCountHist()
void tesseract::PixelHistogram::ConstructVerticalCountHist |
( |
Image |
pix | ) |
|
Definition at line 453 of file devanagari_processing.cpp.
455 int width = pixGetWidth(pix);
456 int height = pixGetHeight(pix);
457 hist_ =
new int[width];
459 int wpl = pixGetWpl(pix);
460 l_uint32 *data = pixGetData(pix);
461 for (
int i = 0; i < width; ++i) {
464 for (
int i = 0; i < height; ++i) {
465 l_uint32 *line = data + i * wpl;
466 for (
int j = 0; j < width; ++j) {
467 if (GET_DATA_BIT(line, j)) {
◆ GetHistogramMaximum()
int tesseract::PixelHistogram::GetHistogramMaximum |
( |
int * |
count | ) |
const |
Definition at line 439 of file devanagari_processing.cpp.
441 for (
int i = 0; i < length_; ++i) {
442 if (hist_[i] > hist_[best_value]) {
447 *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: