From 3d76a5ece54e7a2e28b95c0a124c9df571781674 Mon Sep 17 00:00:00 2001 From: alikia2x Date: Mon, 6 Jan 2025 23:42:11 +0800 Subject: [PATCH] add: type for recognition --- src/electron/backend/recognition.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/electron/backend/recognition.ts diff --git a/src/electron/backend/recognition.ts b/src/electron/backend/recognition.ts new file mode 100644 index 0000000..aae407b --- /dev/null +++ b/src/electron/backend/recognition.ts @@ -0,0 +1,13 @@ +type RecognitionResult = RecognitionLine[]; +type Pixels = number; +type OriginX = Pixels; +type OriginY = Pixels; +type Width = Pixels; +type Height = Pixels; +type Coordinates = [OriginX, OriginY, Width, Height]; + +interface RecognitionLine { + text: string; + confidence?: number | number[]; + position?: Coordinates; +} \ No newline at end of file