Libraryless. Click here for Pure Java version (10540L/61K).
1 | svoid test_g22_regionFilledness() { |
2 | BWImage img = bwImageFromString([[ |
3 | ___xx_ |
4 | ___x__ |
5 | __x__x |
6 | __xx_x |
7 | ______ |
8 | _xx___ |
9 | ]]); |
10 | FastRegions_BWImage regions = new(img); |
11 | regions.run(); |
12 | printStruct(regions.regionsBySize); |
13 | for (i : regions.regionsRoughlyByDecreasingSize()) |
14 | printVars(+i, |
15 | pixels := regions.regionSize(i), |
16 | filledness := g22_regionFilledness(regions.get(i)), |
17 | color := regions.get(i).color()); |
18 | } |
Began life as a copy of #1033951
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033955 |
Snippet name: | test_g22_regionFilledness |
Eternal ID of this version: | #1033955/2 |
Text MD5: | 9b82299e483abb62b2fec5b00fa33c83 |
Transpilation MD5: | 5b29cc5c29d493d40948f54e90d0a60b |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-14 23:04:10 |
Source code size: | 469 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 149 / 199 |
Version history: | 1 change(s) |
Referenced in: | [show references] |