static L<Rect> ocr_mergeOverlappingY_plusPercent(L<Rect> l, float percent) { l = cloneList(l); bool change; do { change = false; for i over l: for (int j = i+1; j < l(l); j++) { Range a = growRangeInPercent(rectYRange(l.get(i)), percent); Range b = growRangeInPercent(rectYRange(l.get(j)), percent); if (rangesOverlap(a, b)) { l.set(i, mergeRects(l.get(i), l.get(j))); l.remove(j--); change = true; } } } while (change); ret l; }
Began life as a copy of #1006336
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006343 |
Snippet name: | ocr_mergeOverlappingY_plusPercent |
Eternal ID of this version: | #1006343/1 |
Text MD5: | f73a1c883a399c56e592bd3b4fe51785 |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-28 23:07:05 |
Source code size: | 538 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 489 / 488 |
Referenced in: | [show references] |