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

11
LINES

< > BotCompany Repo | #1019591 // integralImage_sumRect - sum of rectangle brightness over integral image

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

Libraryless. Click here for Pure Java version (7302L/43K).

meta-for IIntegralImage in IIntegralImage, IntegralImage {
  // one channel
  static int integralImage_sumRect(IIntegralImage img, int x1, int y1, int x2, int y2, int channel) {
    ret iround(img.rectSum(x1, y1, x2, y2, channel));
  }
  
  // sum all channels. TODO: might exceed int range on huge images
  static int integralImage_sumRect(IIntegralImage img, int x1, int y1, int x2, int y2) {
    ret iround(img.rectSum(x1, y1, x2, y2));
  }
}

Author comment

Began life as a copy of #1009128

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019591
Snippet name: integralImage_sumRect - sum of rectangle brightness over integral image
Eternal ID of this version: #1019591/8
Text MD5: 076001e50da7491268b3789ce5cd4305
Transpilation MD5: 18da2be6df7ae5822dab0ea530b5251e
Author: stefan
Category: javax / ocr
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-05 22:53:48
Source code size: 455 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 295 / 411
Version history: 7 change(s)
Referenced in: [show references]