Uses 911K of libraries. Click here for Pure Java version (19677L/111K).
1 | !7 |
2 | |
3 | cmodule AutoChessBoardRecognizer > ChessOCR_DynChessBoardRecognizer { |
4 | new L<ParameterizedSegmenter> seedSegmenters; |
5 | new MRUAndAllTimeTop<ParameterizedSegmenter> chest; |
6 | new Map<S, Result> bestSegmenterForImage; // key: image MD5 |
7 | new L<S> lastImagesLookedAt; // image MD5 |
8 | |
9 | srecord Result(ParameterizedSegmenter segmenter, Rect boardPosition, |
10 | double score, S fen) {} |
11 | |
12 | JComponent segmenterSection() { |
13 | ret dm_calculatedCenteredLabel(() -> |
14 | "Treasure chest size: " + l(chest) |
15 | + ", " + n2(bestSegmenterForImage, "image result") |
16 | + ", " + n2(lastImagesLookedAt, "last image")); |
17 | } |
18 | |
19 | Iterator<ParameterizedSegmenter> makeSegmenters() { |
20 | if (empty(seedSegmenters)) { |
21 | print("Loading seed segmenters"); |
22 | Cl<S> presets = agiBlue_chessBoardSegmenterPresetNames(); |
23 | for ping (S preset : presets) |
24 | seedSegmenters.add(parameterizedSegmenterFromAGIBlue(preset)); |
25 | chest.addAll(seedSegmenters); |
26 | } |
27 | ret chest.mixedIterator(); |
28 | } |
29 | } |
Began life as a copy of #1024674
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024871 |
Snippet name: | Auto Chess Board Recognizer [dev.] |
Eternal ID of this version: | #1024871/5 |
Text MD5: | 21bdf7644e9e4fd54733f7b2196876b7 |
Transpilation MD5: | 8feebcedcf0b1037f9ef28641e60cc75 |
Author: | stefan |
Category: | javax / image recognition |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-28 11:56:58 |
Source code size: | 1023 bytes / 29 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 218 / 1110 |
Version history: | 4 change(s) |
Referenced in: | [show references] |