mirror of http://192.168.1.51:8099/lmh188/twain3.0
44 lines
782 B
C
44 lines
782 B
C
|
#ifndef HG_OCR4_H
|
|||
|
#define HG_OCR4_H
|
|||
|
|
|||
|
#if defined (_WIN32)
|
|||
|
#if !defined (HG_OCR4_BUILD)
|
|||
|
#define HG_OCR4_API __declspec(dllexport)
|
|||
|
#else
|
|||
|
#define HG_OCR4_API __declspec(dllimport)
|
|||
|
#endif
|
|||
|
#else
|
|||
|
#define HG_OCR4_API
|
|||
|
#endif
|
|||
|
|
|||
|
class HG_OCR4_API HG_OCR4
|
|||
|
{
|
|||
|
public:
|
|||
|
|
|||
|
enum PSM_TYPE
|
|||
|
{
|
|||
|
Orientation,
|
|||
|
OCR
|
|||
|
};
|
|||
|
|
|||
|
public:
|
|||
|
HG_OCR4();
|
|||
|
|
|||
|
~HG_OCR4();
|
|||
|
|
|||
|
int init (const char* filename, PSM_TYPE type);
|
|||
|
|
|||
|
int getOrientation(unsigned char* imgData, int width, int height, int channels, int step);
|
|||
|
|
|||
|
int getOCR(unsigned char* imageData, int width, int height, int channels, int dpi);
|
|||
|
|
|||
|
private:
|
|||
|
void init_orientation(const char *filename);
|
|||
|
|
|||
|
void init_ocr(const char* filename);
|
|||
|
private:
|
|||
|
void* api;
|
|||
|
};
|
|||
|
|
|||
|
#endif // HG_OCR4_H
|