Libraryless. Click here for Pure Java version (8048L/46K).
1 | // result "image" contains the square of the distance to the closest |
2 | // "on" pixel in each cell |
3 | static FloatBWImage distanceTransform(BWImage im, float threshold default .5f, bool brightIsOn) {
|
4 | ret new DistanceTransform().dt(im, threshold, brightIsOn); |
5 | } |
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: | 339 / 442 |
| Referenced in: | [show references] |