Libraryless. Click here for Pure Java version (11282L/77K).
1 | static double chessOCR_scorePieceRecognizer(ChessPieceRecognizer recognizer) { |
2 | ret chessOCR_scorePieceRecognizer(chessOCR_squareImagesCollectorFromAGIBlue(), recognizer); |
3 | } |
4 | |
5 | static double chessOCR_scorePieceRecognizer(ChessOCR_SquareImagesCollector squareImagesCollector, ChessPieceRecognizer recognizer) { |
6 | LPair<S, BufferedImage> images = squareImagesCollector.allImages(); |
7 | try { |
8 | new Scorer scorer; |
9 | for (unpair S piece, BufferedImage img : images) { |
10 | scorer.add(eqic(pairA(recognizer.recognize(img)), piece)); |
11 | } |
12 | |
13 | ret scorer.score(); |
14 | } catch print e { |
15 | print("RECOGNIZER TOTAL FAIL"); |
16 | ret 0; |
17 | } |
18 | } |
Began life as a copy of #1024760
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: | #1024820 |
Snippet name: | chessOCR_scorePieceRecognizer |
Eternal ID of this version: | #1024820/2 |
Text MD5: | e631971668b892c6119d624bd06654f7 |
Transpilation MD5: | b1562d867d80219e1325caa255cd812a |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-26 13:58:30 |
Source code size: | 654 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 193 / 289 |
Version history: | 1 change(s) |
Referenced in: | [show references] |