1 | static int nanoAutoSegment_g = 3; |
2 | static int nanoAutoSegment_zoom = 2; |
3 | |
4 | static L<Rect> nanoAutoSegment(BWImage img) { |
5 | new AutoSegmenter as; |
6 | int zoom = nanoAutoSegment_zoom; |
7 | BWImage zoomedImg = bwResizeSmooth(img, img.w()*zoom, img.h()*zoom); |
8 | as.g = nanoAutoSegment_g; |
9 | as.go(zoomedImg); |
10 | ret scaleRects(as.clips, 1.0/zoom); |
11 | } |
12 | |
13 | static L<Rect> nanoAutoSegment(BufferedImage img) { |
14 | ret nanoAutoSegment(new BWImage(img)); |
15 | } |
16 | |
17 | static L<Rect> nanoAutoSegment(RGBImage img) { |
18 | ret nanoAutoSegment(new BWImage(img)); |
19 | } |
Began life as a copy of #1005842
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1007156 |
Snippet name: | nanoAutoSegment - zoom, then auto-segment |
Eternal ID of this version: | #1007156/1 |
Text MD5: | a3d020914f92b8bdeb0c8d22db72847d |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-03-08 16:03:42 |
Source code size: | 540 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 421 / 449 |
Referenced in: | [show references] |