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

8
LINES

< > BotCompany Repo | #1025275 // ii_getPixel

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

Libraryless. Click here for Pure Java version (4973L/28K).

// assumes coordinates are in range
static int ii_getPixel(IntegralImage img, int x, int y) {
  if (img == null) ret 0;
  int r = iround(img.rectSum(x, y, x+1, y+1, 0));
  int g = iround(img.rectSum(x, y, x+1, y+1, 1));
  int b = iround(img.rectSum(x, y, x+1, y+1, 2));
  ret rgbInt(r, g, b);
}

Author comment

Began life as a copy of #1025257

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: #1025275
Snippet name: ii_getPixel
Eternal ID of this version: #1025275/6
Text MD5: b67f2793cd44d0f86c4c2191c62e5d72
Transpilation MD5: 4e906e606cdf0b15687116c6eb2caf17
Author: stefan
Category: javax / integral images
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-09 19:35:58
Source code size: 301 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 207 / 299
Version history: 5 change(s)
Referenced in: [show references]