Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
plotseg.h File Reference
`#include "states.h"`
`#include "render.h"`

Go to the source code of this file.

## Functions

void | display_segmentation (TBLOB *chunks, SEARCH_STATE segmentation)
void | render_segmentation (ScrollView *window, TBLOB *chunks, SEARCH_STATE segmentation)

## Variables

ScrollView * | segm_window
int | wordrec_display_segmentations = 0

## Function Documentation

void display_segmentation | ( | TBLOB * | chunks,
|  | SEARCH_STATE | segmentation
| ) |  |

Definition at line 58 of file plotseg.cpp.

{
/* If no window create it */
if (segm_window == NULL) {
segm_window = c_create_window ("Segmentation", 5, 10,
500, 256, -1000.0, 1000.0, 0.0, 256.0);
}
else {
c_clear_window(segm_window);
}
render_segmentation(segm_window, chunks, segmentation);
/* Put data in the window */
c_make_current(segm_window);
}

void render_segmentation | ( | ScrollView * | window,
|  | TBLOB * | chunks,
|  | SEARCH_STATE | segmentation
| ) |  |

Definition at line 79 of file plotseg.cpp.

{
TBLOB *blob;
C_COL color = Black;
int char_num = -1;
int chunks_left = 0;
TBOX bbox;
if (chunks) bbox = chunks->bounding_box();
for (blob = chunks; blob != NULL; blob = blob->next) {
bbox += blob->bounding_box();
if (chunks_left-- == 0) {
color = color_list[++char_num % NUM_COLORS];
if (char_num < segmentation[0])
chunks_left = segmentation[char_num + 1];
else
chunks_left = MAX_INT32;
}
render_outline(window, blob->outlines, color);
}
window->ZoomToRectangle(bbox.left(), bbox.top(),
bbox.right(), bbox.bottom());
}

## Variable Documentation

ScrollView* segm_window

Definition at line 46 of file plotseg.cpp.

int wordrec_display_segmentations = 0

"Display Segmentations"

Definition at line 48 of file plotseg.cpp.