Libraryless. Click here for Pure Java version (8598L/48K).
srecord noeq CountHolesInRegion(IImageRegion region) { int holes; int get() { if (region == null) ret 0; var borderWalker = new RegionBorder_innerPoints_v2(region); borderWalker.onNewTrace(isHole -> { if (isHole) holes++; }); borderWalker.run(); ret holes; } }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1034657 |
| Snippet name: | CountHolesInRegion |
| Eternal ID of this version: | #1034657/2 |
| Text MD5: | dc88924a25320ee541dd998e4236b0b0 |
| Transpilation MD5: | 0fc24f11618c409fcbe0e0f9ce5f0c64 |
| Author: | stefan |
| Category: | javax / gazelle 22 |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-02-28 22:39:33 |
| Source code size: | 299 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 706 / 837 |
| Version history: | 1 change(s) |
| Referenced in: | #1003674 - Standard Classes + Interfaces (LIVE continued in #1034167) #1034662 - RegionHoleBounds - find bounds of each hole in region |