Tesseract  3.02
tesseract-ocr/wordrec/plotedges.h File Reference
#include "callcpp.h"
#include "oldlist.h"
#include "blobs.h"
#include "split.h"

Go to the source code of this file.

Defines

#define update_edge_window()
#define edge_window_wait()   if (wordrec_display_splits) window_wait (edge_window)

Functions

void display_edgepts (LIST outlines)
void draw_blob_edges (TBLOB *blob)
void mark_outline (EDGEPT *edgept)
void mark_split (SPLIT *split)

Variables

ScrollViewedge_window

Define Documentation

#define edge_window_wait ( )    if (wordrec_display_splits) window_wait (edge_window)

Definition at line 58 of file plotedges.h.

#define update_edge_window ( )
Value:
if (wordrec_display_splits) {                  \
        c_make_current (edge_window);      \
}                                      \

Definition at line 46 of file plotedges.h.


Function Documentation

void display_edgepts ( LIST  outlines)

Definition at line 53 of file plotedges.cpp.

                                    {
  void *window;
  /* Set up window */
  if (edge_window == NULL) {
    edge_window = c_create_window ("Edges", 750, 150,
      400, 128, -400.0, 400.0, 0.0, 256.0);
  }
  else {
    c_clear_window(edge_window);
  }
  /* Render the outlines */
  window = edge_window;
  /* Reclaim old memory */
  iterate(outlines) {
    render_edgepts (window, (EDGEPT *) first_node (outlines), White);
  }
}
void draw_blob_edges ( TBLOB blob)

Definition at line 77 of file plotedges.cpp.

                                  {
  TESSLINE *ol;
  LIST edge_list = NIL_LIST;

  if (wordrec_display_splits) {
    for (ol = blob->outlines; ol != NULL; ol = ol->next)
      push_on (edge_list, ol->loop);
    display_edgepts(edge_list);
    destroy(edge_list);
  }
}
void mark_outline ( EDGEPT edgept)

Definition at line 95 of file plotedges.cpp.

                                  {  /* Start of point list */
  void *window = edge_window;
  float x = edgept->pos.x;
  float y = edgept->pos.y;

  c_line_color_index(window, Red);
  c_move(window, x, y);

  x -= 4;
  y -= 12;
  c_draw(window, x, y);

  x -= 2;
  y += 4;
  c_draw(window, x, y);

  x -= 4;
  y += 2;
  c_draw(window, x, y);

  x += 10;
  y += 6;
  c_draw(window, x, y);

  c_make_current(window);
}
void mark_split ( SPLIT split)

Definition at line 130 of file plotedges.cpp.

                              {
  void *window = edge_window;

  c_line_color_index(window, Green);
  c_move (window, (float) split->point1->pos.x, (float) split->point1->pos.y);
  c_draw (window, (float) split->point2->pos.x, (float) split->point2->pos.y);
  c_make_current(window);
}

Variable Documentation

Definition at line 43 of file plotedges.cpp.