tesseract
5.0.0-alpha-619-ge9db
|
#include "params.h"
#include "scrollview.h"
#include "pitsync1.h"
#include "blobbox.h"
Go to the source code of this file.
|
ScrollView * | create_to_win (ICOORD page_tr) |
|
void | close_to_win () |
|
void | create_todebug_win () |
|
void | plot_box_list (ScrollView *win, BLOBNBOX_LIST *list, ScrollView::Color body_colour) |
|
void | plot_to_row (TO_ROW *row, ScrollView::Color colour, FCOORD rotation) |
|
void | plot_parallel_row (TO_ROW *row, float gradient, int32_t left, ScrollView::Color colour, FCOORD rotation) |
|
void | draw_occupation (int32_t xleft, int32_t ybottom, int32_t min_y, int32_t max_y, int32_t occupation[], int32_t thresholds[]) |
|
void | draw_meanlines (TO_BLOCK *block, float gradient, int32_t left, ScrollView::Color colour, FCOORD rotation) |
|
void | plot_word_decisions (ScrollView *win, int16_t pitch, TO_ROW *row) |
|
void | plot_fp_cells (ScrollView *win, ScrollView::Color colour, BLOBNBOX_IT *blob_it, int16_t pitch, int16_t blob_count, STATS *projection, int16_t projection_left, int16_t projection_right, float projection_scale) |
|
void | plot_fp_cells2 (ScrollView *win, ScrollView::Color colour, TO_ROW *row, FPSEGPT_LIST *seg_list) |
|
void | plot_row_cells (ScrollView *win, ScrollView::Color colour, TO_ROW *row, float xshift, ICOORDELT_LIST *cells) |
|
◆ NO_SMD
◆ close_to_win()
◆ create_to_win()
Definition at line 42 of file drawtord.cpp.
47 page_tr.
x() + 1, page_tr.
y() + 1,
48 page_tr.
x(), page_tr.
y(),
true);
◆ create_todebug_win()
void create_todebug_win |
( |
| ) |
|
◆ draw_meanlines()
Definition at line 200 of file drawtord.cpp.
216 TO_ROW_IT row_it = block->
get_rows ();
221 for (row_it.mark_cycle_pt (); !row_it.cycled_list (); row_it.forward ()) {
222 row = row_it.data ();
224 blob_it.move_to_last ();
225 right = blob_it.data ()->bounding_box ().right ();
227 FCOORD (static_cast<float>(left),
229 plot_pt.
rotate (rotation);
◆ draw_occupation()
void draw_occupation |
( |
int32_t |
xleft, |
|
|
int32_t |
ybottom, |
|
|
int32_t |
min_y, |
|
|
int32_t |
max_y, |
|
|
int32_t |
occupation[], |
|
|
int32_t |
thresholds[] |
|
) |
| |
Definition at line 157 of file drawtord.cpp.
172 auto fleft = static_cast<float>(xleft);
177 for (line_index = min_y; line_index <= max_y; line_index++) {
178 if (occupation[line_index - min_y] < thresholds[line_index - min_y]) {
190 to_win->
DrawTo(fleft + occupation[line_index - min_y] / 10.0, static_cast<float>(line_index));
◆ plot_box_list()
Definition at line 64 of file drawtord.cpp.
72 BLOBNBOX_IT it = list;
74 win->
Pen(body_colour);
76 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
◆ plot_fp_cells()
void plot_fp_cells |
( |
ScrollView * |
win, |
|
|
ScrollView::Color |
colour, |
|
|
BLOBNBOX_IT * |
blob_it, |
|
|
int16_t |
pitch, |
|
|
int16_t |
blob_count, |
|
|
STATS * |
projection, |
|
|
int16_t |
projection_left, |
|
|
int16_t |
projection_right, |
|
|
float |
projection_scale |
|
) |
| |
Definition at line 308 of file drawtord.cpp.
329 FPSEGPT_LIST seg_list;
333 if (pitsync_linear_version)
335 projection_left, projection_right,
336 projection_scale, occupation, &seg_list, 0, 0);
339 word_box = blob_it->data ()->bounding_box ();
340 for (; blob_count > 0; blob_count--)
342 seg_it.set_to_list (&seg_list);
343 for (seg_it.mark_cycle_pt (); !seg_it.cycled_list (); seg_it.forward ()) {
◆ plot_fp_cells2()
Definition at line 351 of file drawtord.cpp.
368 FPSEGPT_IT seg_it = seg_list;
373 word_box = blob_it.data ()->bounding_box ();
374 for (blob_it.mark_cycle_pt (); !blob_it.cycled_list ();)
◆ plot_parallel_row()
Definition at line 117 of file drawtord.cpp.
132 auto fleft = static_cast<float>(left);
137 right = it.data ()->bounding_box ().right ();
140 plot_pt =
FCOORD (fleft, gradient * left + row->
max_y ());
141 plot_pt.
rotate (rotation);
143 plot_pt =
FCOORD (fleft, gradient * left + row->
min_y ());
144 plot_pt.
rotate (rotation);
147 plot_pt.
rotate (rotation);
◆ plot_row_cells()
Definition at line 383 of file drawtord.cpp.
402 ICOORDELT_IT cell_it = cells;
◆ plot_to_row()
Definition at line 84 of file drawtord.cpp.
102 left = it.data ()->bounding_box ().left ();
104 right = it.data ()->bounding_box ().right ();
108 plot_pt.
rotate (rotation);
◆ plot_word_decisions()
Definition at line 239 of file drawtord.cpp.
260 BLOBNBOX_IT start_it = blob_it;
265 for (blob_it.mark_cycle_pt (); !blob_it.cycled_list (); blob_it.forward ()) {
266 blob = blob_it.data ();
284 colour = static_cast<ScrollView::Color>(colour + 1);
291 win->
Brush(rect_colour);
293 blob_box.
left (), blob_box.
top ());
297 prev_x = blob_box.
right();
298 if (blob->
cblob () !=
nullptr)
299 blob->
cblob ()->
plot (win, colour, colour);
◆ textord_show_fixed_cuts
bool textord_show_fixed_cuts = false |
"Draw fixed pitch cell boundaries"
Definition at line 32 of file drawtord.cpp.
◆ to_debug
◆ to_debugfile
◆ to_smdfile
char* to_smdfile = "none" |
◆ to_win
double check_pitch_sync2(BLOBNBOX_IT *blob_it, int16_t blob_count, int16_t pitch, int16_t pitch_error, STATS *projection, int16_t projection_left, int16_t projection_right, float projection_scale, int16_t &occupation_count, FPSEGPT_LIST *seg_list, int16_t start, int16_t end)
double textord_projection_scale
void plot_fp_cells(ScrollView *win, ScrollView::Color colour, BLOBNBOX_IT *blob_it, int16_t pitch, int16_t blob_count, STATS *projection, int16_t projection_left, int16_t projection_right, float projection_scale)
bool textord_show_fixed_cuts
void DrawTo(int x, int y)
int16_t x() const
access function
double check_pitch_sync(BLOBNBOX_IT *blob_it, int16_t blob_count, int16_t pitch, int16_t pitch_error, STATS *projection, FPSEGPT_LIST *seg_list)
bool joined_to_prev() const
void rotate(const FCOORD vec)
const TBOX & bounding_box() const
TBOX box_next(BLOBNBOX_IT *it)
DLLSYM void tprintf(const char *format,...)
void SetCursor(int x, int y)
void Rectangle(int x1, int y1, int x2, int y2)
void plot(ScrollView *window, ScrollView::Color blob_colour, ScrollView::Color child_colour)
void plot_blob_list(ScrollView *win, BLOBNBOX_LIST *list, ScrollView::Color body_colour, ScrollView::Color child_colour)
BLOBNBOX_LIST * blob_list()
int16_t y() const
access_function