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

7
LINES

< > BotCompany Repo | #1019784 // bwIntegralImage_sumBorder - add pixels in a "border" (rectangle) of certain line width/height

JavaX fragment (include)

// x1/y1/x2/y2 are dimensions of the inner (empty) part of the rectangle
// w/h = line width/height
static int bwIntegralImage_sumBorder(BWIntegralImage img, int x1, int y1, int x2, int y2, int w, int h) {
  ret
    bwIntegralImage_sumRect(x1-w, y1-h, x2+w, y2+h)
    -bwIntegralImage_sumRect(x1, y1, x2, y2);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019784
Snippet name: bwIntegralImage_sumBorder - add pixels in a "border" (rectangle) of certain line width/height
Eternal ID of this version: #1019784/2
Text MD5: 25d5179d64ef53851bffbb606726a1d4
Author: stefan
Category: javax / image analysis
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-26 19:19:08
Source code size: 317 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 298 / 329
Version history: 1 change(s)
Referenced in: [show references]