#include <baselinedetect.h>
Definition at line 242 of file baselinedetect.h.
◆ BaselineDetect()
tesseract::BaselineDetect::BaselineDetect |
( |
int |
debug_level, |
|
|
const FCOORD & |
page_skew, |
|
|
TO_BLOCK_LIST * |
blocks |
|
) |
| |
Definition at line 793 of file baselinedetect.cpp.
795 : page_skew_(page_skew), debug_level_(debug_level) {
796 TO_BLOCK_IT it(blocks);
797 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
807 bool non_text = pb !=
nullptr && !pb->
IsText();
808 blocks_.push_back(
new BaselineBlock(debug_level_, non_text, to_block));
POLY_BLOCK * poly_block() const
◆ ~BaselineDetect()
tesseract::BaselineDetect::~BaselineDetect |
( |
| ) |
|
|
default |
◆ ComputeBaselineSplinesAndXheights()
void tesseract::BaselineDetect::ComputeBaselineSplinesAndXheights |
( |
const ICOORD & |
page_tr, |
|
|
bool |
enable_splines, |
|
|
bool |
remove_noise, |
|
|
bool |
show_final_rows, |
|
|
Textord * |
textord |
|
) |
| |
Definition at line 847 of file baselinedetect.cpp.
852 for (
int i = 0; i < blocks_.size(); ++i) {
853 BaselineBlock* bl_block = blocks_[i];
855 bl_block->PrepareForSplineFitting(page_tr, remove_noise);
856 bl_block->FitBaselineSplines(enable_splines, show_final_rows, textord);
857 if (show_final_rows) {
858 bl_block->DrawFinalRows(page_tr);
◆ ComputeStraightBaselines()
void tesseract::BaselineDetect::ComputeStraightBaselines |
( |
bool |
use_box_bottoms | ) |
|
Definition at line 815 of file baselinedetect.cpp.
817 for (
int i = 0; i < blocks_.size(); ++i) {
818 BaselineBlock* bl_block = blocks_[i];
819 if (debug_level_ > 0)
820 tprintf(
"Fitting initial baselines...\n");
821 if (bl_block->FitBaselinesAndFindSkew(use_box_bottoms)) {
822 block_skew_angles.
push_back(bl_block->skew_angle());
826 double default_block_skew = page_skew_.
angle();
827 if (!block_skew_angles.
empty()) {
830 if (debug_level_ > 0) {
831 tprintf(
"Page skew angle = %g\n", default_block_skew);
835 for (
int i = 0; i < blocks_.size(); ++i) {
836 BaselineBlock* bl_block = blocks_[i];
837 bl_block->ParallelizeBaselines(default_block_skew);
838 bl_block->SetupBlockParameters();
float angle() const
find angle
DLLSYM void tprintf(const char *format,...)
T MedianOfCircularValues(T modulus, GenericVector< T > *v)
The documentation for this class was generated from the following files: