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

10
LINES

< > BotCompany Repo | #1027207 // iBWIntegralImageToBWImage

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

Libraryless. Click here for Pure Java version (5136L/33K).

static BWImage iBWIntegralImageToBWImage(IBWIntegralImage img) {
  int w = img.getWidth(), h = img.getHeight();
  BWImage out = new(w, h);
  for y to h:
    for x to w: {
      int pixel = iround(img.getPixelAverage(x, y, x+1, y+1));
      out.setByte(x, y, (byte) pixel);
    }
  ret out;
}

Author comment

Began life as a copy of #1019597

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027207
Snippet name: iBWIntegralImageToBWImage
Eternal ID of this version: #1027207/5
Text MD5: 1db7419dafff72e789a29399822bfae2
Transpilation MD5: 5e4e4fb33fc9e75b8e53efa3575fc4a3
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-26 10:46:49
Source code size: 300 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 213 / 316
Version history: 4 change(s)
Referenced in: [show references]