You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function TSimpleOCR.TextToMatrix(Text: String; constref Font: TFontSet): TIntegerMatrix;
26
+
function TSimpleOCR.TextToTPA(Text: String; constref Font: TFontSet): TPointArray;
23
27
```
24
28
25
29
----
26
30
27
31
## Filters
28
32
33
+
-### AnyColor Filter
34
+
35
+
The first pixel (highlighted in red) of the character being checked is the color used, all other of the character must fall within `Tolerance` of that.
36
+
37
+
If the fontset has a shadow each RGB value of a possible shadow point must be below `MaxShadowValue`.
38
+
```pascal
39
+
function TOCRAnyColorFilter.Create(Tolerance: Integer; MaxShadowValue: Integer): TOCRAnyColorFilter; static;
40
+
```
41
+

42
+
43
+
This filter is generally used for uptext reading.
44
+
45
+
---
46
+
29
47
-### Color filter
30
48
31
49
Basic color finding.
@@ -94,7 +112,6 @@ function TSimpleOCR.LocateText(Area: TBox; Font: TFontSet; out Bounds: TBox): Si
94
112
95
113
## Locate Text
96
114
97
-
The `LocateText` function does **not** OCR! An image of the desired text is generated and searched for. Again quite similar to Simba's `FindBitmap`.
98
-
-A filter is not required if each pixel of the text is the exact same color. Although this is quite a lot slower.
115
+
The `LocateText` function does **not** OCR! An "image" of the desired text is generated with `TextToMatrix/TextToTPA` and searched for. Again quite similar to Simba's `FindBitmap`.
116
+
-Works well with `TOCRAnyColorFilter`. Although this is slower.
99
117
- Will not work if the spacing between characters is dynamic.
0 commit comments