add: type for recognition

This commit is contained in:
alikia2x (寒寒) 2025-01-06 23:42:11 +08:00
parent 094f8a0925
commit 3d76a5ece5
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6

View File

@ -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;
}