/*
 *  OcrInterface.h
 *  Chipmunk
 *
 *  Created by Trixa on 7/11/09.
 *  Copyright 2009 ABISee. All rights reserved.
 *
 */
#ifndef __OCR_INTERFACE_H_
#define __OCR_INTERFACE_H_ 
extern "C" {
	typedef struct {
		unsigned short char_code;              /*character itself */
		short left;                    /*of char (-1) */
		short right;                   /*of char (-1) */
		short top;                     /*of char (-1) */
		short bottom;                  /*of char (-1) */
		short font_index;              /*what font (0) */
		unsigned char confidence;              /*0=perfect, 100=reject (0/100) */
		unsigned char point_size;              /*of char, 72=i inch, (10) */
		char blanks;                   /*no of spaces before this char (1) */
		unsigned char formatting;              /*char formatting (0) */
	} OCR_CHAR;
	
	bool OcrInit(const char *sDataDir, const char *sLang);
	//pImg is 1bpp image.
	int OcrRecognize(unsigned char *pImg, unsigned int uImgWidth, unsigned int uImgHeight, OCR_CHAR **ppOcrResult);
	void OcrTerm();
}
#endif // __OCR_INTERFACE_H_