This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ocr.h
39 lines (30 loc) · 1.61 KB
/
ocr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// flare16x core
// Developed 2019 by Benedikt Muessig <[email protected]>
// Licensed under GPLv3
//
// ocr.h: Header file for the optical character recognition functions for the OSD text
//
#ifndef FLARE16X_OCR_H
#define FLARE16X_OCR_H
#include "error.h"
#include "canvas.h"
#define FLARE16X_OCR_LARGE_WIDTH 18
#define FLARE16X_OCR_LARGE_HEIGHT 23
#define FLARE16X_OCR_LARGE_COLOR flare16x_canvas_rgb888(0xff, 0xff, 0xff)
#define FLARE16X_OCR_SMALL_WIDTH 10
#define FLARE16X_OCR_SMALL_HEIGHT 12
#define FLARE16X_OCR_SMALL_COLOR flare16x_canvas_rgb888(0xff, 0xff, 0xff)
// Attempts to detect a single large font character
flare16x_error flare16x_ocr_large_char(uint16_t offset_x, uint16_t offset_y, flare16x_canvas* canvas,
char* result_char);
// Attempts to detect a large string (with capacity length + 1) of length characters
flare16x_error flare16x_ocr_large_string(uint16_t offset_x, uint16_t offset_y, uint16_t pitch, uint16_t length,
uint16_t max_unknown, flare16x_canvas* canvas, char* result_string);
// Attempts to detect a single small font character
flare16x_error flare16x_ocr_small_char(uint16_t offset_x, uint16_t offset_y, flare16x_canvas* canvas,
char* result_char);
// Attempts to detect a small string (with capacity length + 1) of length characters
flare16x_error flare16x_ocr_small_string(uint16_t offset_x, uint16_t offset_y, uint16_t pitch, uint16_t length,
uint16_t max_unknown, flare16x_canvas* canvas, char* result_string);
#endif //FLARE16X_OCR_H