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

13
LINES

< > BotCompany Repo | #1025175 // integralImageToRGBImage

JavaX fragment (include)

1  
static RGBImage integralImageToRGBImage(IntegralImage img) {
2  
  if (img == null) null;
3  
  int w = img.w, h = img.h;
4  
  RGBImage out = new(w, h);
5  
  for y to h:
6  
    for x to w: {
7  
      int r = integralImage_sumRect(img, x, y, x+1, y+1, 0);
8  
      int g = integralImage_sumRect(img, x, y, x+1, y+1, 1);
9  
      int b = integralImage_sumRect(img, x, y, x+1, y+1, 2);
10  
      out.setPixel(x, y, r, g, b);
11  
    }
12  
  ret out;
13  
}

Author comment

Began life as a copy of #1025174

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: #1025175
Snippet name: integralImageToRGBImage
Eternal ID of this version: #1025175/1
Text MD5: afc9e931ca523df0978bf50a1418caff
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-10 14:24:42
Source code size: 422 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 254 / 284
Referenced in: [show references]