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).

static IBWIntegralImage stripedBWIntegralImage(ThreadPoolExecutor executor default null, int stripes, BufferedImage img) {
  if (executor != null) stripes = min(stripes, executor.getMaximumPoolSize());
  int _stripes = stripes;
  
  int minPixelsToSplit = 16384;
  int w = img.getWidth(), h = img.getHeight();
  if (stripes <= 1 || w*h <= minPixelsToSplit)
    ret BWIntegralImage(img);
  else
    ret BWIntegralImage_twoParts(executor, img, (img2, idx) ->
      stripedBWIntegralImage(executor, (_stripes+idx) >> 1, img2));
}

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: 154 / 223
Version history: 6 change(s)
Referenced in: [show references]