"Fossies" - the Fresh Open Source Software Archive

Member "tesseract-ocr/doc/html/blread_8h.html" (26 Oct 2012, 14443 Bytes) of package /linux/misc/old/tesseract-ocr-3.02.02-doc-html.tar.gz:

Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the tesseract-ocr-3.02.02-doc-html.tar.gz project site itself.

Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
blread.h File Reference
#include "params.h"
#include "ocrblock.h"

Go to the source code of this file.


bool read_unlv_file (STRING name, inT32 xsize, inT32 ysize, BLOCK_LIST *blocks)
void FullPageBlock (int width, int height, BLOCK_LIST *blocks)

Function Documentation

void FullPageBlock ( int  width,
int  height,
BLOCK_LIST *  blocks 

Definition at line 69 of file blread.cpp.

BLOCK_IT block_it(blocks);
BLOCK* block = new BLOCK("", TRUE, 0, 0, 0, 0, width, height);
bool read_unlv_file ( STRING  name,
inT32  xsize,
inT32  ysize,
BLOCK_LIST *  blocks 

Definition at line 37 of file blread.cpp.

FILE *pdfp; //file pointer
BLOCK *block; //current block
int x; //current top-down coords
int y;
int width; //of current block
int height;
BLOCK_IT block_it = blocks; //block iterator
name += UNLV_EXT; //add extension
if ((pdfp = fopen (name.string (), "rb")) == NULL) {
return false; //didn't read one
else {
while (fscanf (pdfp, "%d %d %d %d %*s", &x, &y, &width, &height) >= 4) {
//make rect block
block = new BLOCK (name.string (), TRUE, 0, 0,
(inT16) x, (inT16) (ysize - y - height),
(inT16) (x + width), (inT16) (ysize - y));
//on end of list
block_it.add_to_end (block);
return true;