RetroArch/translation/ocr_driver.h

35 lines
896 B
C
Raw Normal View History

#ifndef __OCR_DRIVER__H
#define __OCR_DRIVER__H
struct ocr_image_info
{
int game_character_set;
unsigned image_width;
unsigned image_height;
unsigned pixel_format;
void* image_data;
};
typedef struct ocr_driver
{
void* (*init)();
void (*free)(void* data);
/* returned char pointers do not need to be freed but are 1 time use, they may be destroyed on the next call to get_text */
char* (*get_text)(void* data, struct ocr_image_info image);
const char *ident;
} ocr_driver_t;
2018-01-17 22:00:57 +00:00
#ifdef HAVE_TESSERACT
extern const ocr_driver_t ocr_tesseract;
2018-01-17 22:00:57 +00:00
#endif
extern const ocr_driver_t ocr_null;
2018-01-17 22:00:57 +00:00
bool ocr_driver_init(void);
void ocr_driver_free(void);
/* returned char pointers do not need to be freed but are 1 time use, they may be destroyed on the next call to ocr_driver_get_text */
2018-01-17 22:00:57 +00:00
char* ocr_driver_get_text(struct ocr_image_info image);
#endif