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

11
LINES

< > BotCompany Repo | #1024731 // chessOCR_piecePreprocessing_1

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

Libraryless. Click here for Pure Java version (3480L/22K).

1  
// threshold 0.75 + Cubed distance from black 3.0 + blur + min 3",
2  
static BWImage chessOCR_piecePreprocessing_1(BufferedImage img, O... _) {
3  
  optPar int version = 1;
4  
  BWImage bw = bwImageTo2Bit(0.75f,
5  
    img_cubedDistanceFromColor_withGain(rgbBlack(), 3.0,
6  
      blurFilterBufferedImage(
7  
        minFilterBufferedImage(3,
8  
          img))));
9  
  if (version == 1) bw = bwAutoCrop(bw);
10  
  ret bw;
11  
}

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: #1024731
Snippet name: chessOCR_piecePreprocessing_1
Eternal ID of this version: #1024731/5
Text MD5: cbadd02fdff79a7e14e8cb5f1525cc14
Transpilation MD5: 81824f57864921dee5e11e98b780bfc9
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-26 14:50:47
Source code size: 406 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 251 / 347
Version history: 4 change(s)
Referenced in: [show references]