Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1024903 // DominantColorBasedSegmenter

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (6787L/43K).

1  
sclass DominantColorBasedSegmenter implements IF1<BufferedImage, L<Rect>> {
2  
  ParameterizedSegmenter baseSegmenter;
3  
  int nColors = 5;
4  
  
5  
  *() {}
6  
  *(ParameterizedSegmenter *baseSegmenter) {}
7  
  
8  
  public L<Rect> get(BufferedImage img) {
9  
    L<ParameterizedSegmenter> segmenters = asList(chessOCR_adaptSegmenterToMainImageColors(img, baseSegmenter, maxColors := nColors));
10  
    L<Rect> l = asList(roundRobinCombinedIterator(map(segmenters, s -> iterator(s.get(img)))));
11  
    print("Have " + nRects(l));
12  
    ret l;
13  
  }
14  
}

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: 228 / 629
Version history: 3 change(s)
Referenced in: [show references]