-
Notifications
You must be signed in to change notification settings - Fork 23
/
IdentifiedCharacter.java
38 lines (30 loc) · 972 Bytes
/
IdentifiedCharacter.java
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
package net.kanjitomo;
import java.awt.Rectangle;
import java.util.List;
/**
* OCR results for a single target character
*/
public class IdentifiedCharacter {
/**
* List of reference characters that match the target character best,
* ordered by OCR score (first character is the closest match).
*/
public final String referenceCharacters;
/**
* OCR scores for each reference character. Same order as in referenceCharacters.
* Higher score is better but reference characters might have been re-ordered if
* first match didn't result in a valid dictionary word.
*/
public final List<Integer> scores;
// TODO normalized scores
/**
* Location of the character in target image's coordinates
*/
public final Rectangle location;
public IdentifiedCharacter(String matchedCharacters, Rectangle location,
List<Integer> scores) {
this.referenceCharacters = matchedCharacters;
this.location = location;
this.scores = scores;
}
}