Libraryless. Click here for Pure Java version (6787L/43K).
sclass DominantColorBasedSegmenter implements IF1<BufferedImage, L<Rect>> { ParameterizedSegmenter baseSegmenter; int nColors = 5; *() {} *(ParameterizedSegmenter *baseSegmenter) {} public L<Rect> get(BufferedImage img) { L<ParameterizedSegmenter> segmenters = asList(chessOCR_adaptSegmenterToMainImageColors(img, baseSegmenter, maxColors := nColors)); L<Rect> l = asList(roundRobinCombinedIterator(map(segmenters, s -> iterator(s.get(img))))); print("Have " + nRects(l)); ret l; } }
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: | #1024903 |
Snippet name: | DominantColorBasedSegmenter |
Eternal ID of this version: | #1024903/4 |
Text MD5: | a422bb4473912f53d66987ff957d07b6 |
Transpilation MD5: | d700f591fcd43ba6e7147e8175367129 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-29 13:14:00 |
Source code size: | 530 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 229 / 630 |
Version history: | 3 change(s) |
Referenced in: | #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674) |