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

12
LINES

< > BotCompany Repo | #1030536 // stripedBWIntegralImage

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

Libraryless. Click here for Pure Java version (6788L/42K).

1  
static IBWIntegralImage stripedBWIntegralImage(ThreadPoolExecutor executor default null, int stripes, BufferedImage img) {
2  
  if (executor != null) stripes = min(stripes, executor.getMaximumPoolSize());
3  
  int _stripes = stripes;
4  
  
5  
  int minPixelsToSplit = 16384;
6  
  int w = img.getWidth(), h = img.getHeight();
7  
  if (stripes <= 1 || w*h <= minPixelsToSplit)
8  
    ret BWIntegralImage(img);
9  
  else
10  
    ret BWIntegralImage_twoParts(executor, img, (img2, idx) ->
11  
      stripedBWIntegralImage(executor, (_stripes+idx) >> 1, img2));
12  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030536
Snippet name: stripedBWIntegralImage
Eternal ID of this version: #1030536/7
Text MD5: 956a3e0bf2439292cb94fb20237e494e
Transpilation MD5: 459bae66afeae71f88ca84f2cb01a4b3
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-01-07 03:07:23
Source code size: 537 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 229 / 321
Version history: 6 change(s)
Referenced in: [show references]