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

16
LINES

< > BotCompany Repo | #1035420 // imageToBinary - extended synonym of bwImageToBinary

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

Libraryless. Click here for Pure Java version (10723L/61K).

1  
// anything >= threshold ends up white
2  
static Image2B imageToBinary(BufferedImage img, double threshold) {
3  
  ret bwImageToBinary(new BWImage(img), zeroToOneToZeroTo255(threshold));
4  
}
5  
6  
static Image2B imageToBinary(BufferedImage img, int threshold) {
7  
  ret bwImageToBinary(new BWImage(img), threshold);
8  
}
9  
10  
static Image2B imageToBinary(BWImage img, double threshold) {
11  
  ret bwImageToBinary(img, zeroToOneToZeroTo255(threshold));
12  
}
13  
14  
static Image2B imageToBinary(BWImage img, int threshold) {
15  
  ret bwImageToBinary(img, threshold);
16  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035420
Snippet name: imageToBinary - extended synonym of bwImageToBinary
Eternal ID of this version: #1035420/4
Text MD5: 9c97d70ed727c4bf0c54033abe326cf2
Transpilation MD5: 6c43e4f7a63aeeadbc217f5a2ff7aac5
Author: someone
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-05-07 01:36:09
Source code size: 544 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 165 / 230
Version history: 3 change(s)
Referenced in: [show references]