1 | static int ocr_slimFullSearchMap_maxPixels = 1000; |
2 | |
3 | static Map<BWImage, S> ocr_slimFullSearchMap(Map<BWImage, S> map) { |
4 | if (ocr_slimFullSearchMap_maxPixels <= 0) ret map; |
5 | for (BWImage img : cloneKeys(map)) { |
6 | int pix = bwImagePixels(img); |
7 | continue if pix <= ocr_slimFullSearchMap_maxPixels; |
8 | BWImage img2 = new BWImage(scaleBufferedImageToMaxPixels(ocr_slimFullSearchMap_maxPixels, img.getBufferedImage())); |
9 | //print("Shrunk image to " + img2.getWidth() + "*" + img2.getHeight()); |
10 | S md5 = map.get(img); |
11 | map.remove(img); |
12 | map.put(img2, md5); |
13 | } |
14 | ret map; |
15 | } |
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: | #1015442 |
Snippet name: | ocr_slimFullSearchMap |
Eternal ID of this version: | #1015442/7 |
Text MD5: | 2149468817b61ef6a419d070987cd9cc |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-15 00:47:58 |
Source code size: | 599 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 415 / 437 |
Version history: | 6 change(s) |
Referenced in: | [show references] |