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

5
LINES

< > BotCompany Repo | #1034931 // distanceTransform

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

Libraryless. Click here for Pure Java version (8048L/46K).

// result "image" contains the square of the distance to the closest
// "on" pixel in each cell
static FloatBWImage distanceTransform(BWImage im, float threshold default .5f, bool brightIsOn) {
  ret new DistanceTransform().dt(im, threshold, brightIsOn);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034931
Snippet name: distanceTransform
Eternal ID of this version: #1034931/1
Text MD5: d41557fb02065efa8595ce77cb1ad275
Transpilation MD5: 0ee3885ef8a91e00d8490b0841860103
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-16 12:19:17
Source code size: 260 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 43 / 67
Referenced in: [show references]