#include <vvocr/vvxtrFactory.h>
#include <string>
#include <ios>
#include <iostream>
#include <fstream>
#include <signal.h>
Include dependency graph for vvxtrSample2.cc:

Go to the source code of this file.
Functions | |
| vvEngAPI * | CreateEngine () |
| vvxtrStatus | runOCR (vvEngAPI *xtrEngine) |
| vvxtrStatus | processOneDocument (vvEngAPI *xtrEngine) |
| vvxtrStatus | processOnePage (vvEngAPI *xtrEngine) |
| vvxtrStatus | outputDoc (vvEngAPI *xtrEngine) |
| vvxtrStatus | outputImg (vvEngAPI *xtrEngine) |
| vvxtrStatus | createImageStruct (unsigned char *buf, vvxtrImage **inputImage) |
| Helper function that sets up a vvxtrImage structure using the raw image data stored in buf. | |
| vvxtrImage * | readFromRawData () |
| Read raw image data from a file and place it in a vvxtrImage structure so it may be sent to the OCR engine. | |
| void | CloseDown () |
| void | SigTermHandler (int param) |
| void | SigErrorHandler (int param) |
| int | main (int argc, char **argv) |
Variables | |
| string | g_remoteEngine |
| vvEngAPI * | g_xtrEngine = NULL |
This sample program demonstrates how to load image data from memory directly into the OCR engine through a call to vvEngAPI::vvReadImageData(const struct vvxtrImage * img).
The raw image data must be in chunky (interleaved) format, can be 1, 8, or 24 bits per pixel, and should have any line padding taken into account in the bytes per line.
A sample raw image for use as input is available off of Vividata's website:
http://www.vividata.com/images/sample.raw.gz
For this sample image:
width = 2058
height = 319
bpl = 2058
xdpi = 300
ydpi = 300
bpp = 8
bps = 8
Copyright (C) 2003, Vividata, All Rights Reserved
Definition in file vvxtrSample2.cc.
|
||||||||||||
|
Helper function that sets up a vvxtrImage structure using the raw image data stored in buf. buf already has memory allocated for it. imageInput is allocated in this function.
Definition at line 718 of file vvxtrSample2.cc. References vvxtrStatus. Referenced by readFromRawData(). |
|
|
Read raw image data from a file and place it in a vvxtrImage structure so it may be sent to the OCR engine.
Definition at line 648 of file vvxtrSample2.cc. References createImageStruct(). |
1.3.2