AI > MemorizeBrightBLOB { RGBImage blobImage; static ImageSurface is; static L<Rect> segment(RGBImage img) { ret autoSegment_blackBG(new BWImage(img), 3); // 2 is too small } void go { // guess L<Rect> myRects = segment(image); Rect guess = null; if (blobImage != null) guess = rgbFindMostSimilarClip(image, blobImage, myRects, 0); // submit Rect solution = first(submit(guess)); // learn if (blobImage == null) { solution = autoCropOfRGBImage_blackBG(image, solution); Rect mine = smallestRectContaining(myRects, centerOfRect(solution)); if (mine != null) { blobImage = image.clip(mine); is = showZoomedImage(is, "Memorized BLOB", blobImage); } } } }
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: | #1006892 |
Snippet name: | MemorizeBrightBLOB (AI) |
Eternal ID of this version: | #1006892/2 |
Text MD5: | 9248020a0df7d26da9e4b3b673ec88a9 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-02-14 02:06:43 |
Source code size: | 811 bytes / 32 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 400 / 865 |
Version history: | 1 change(s) |
Referenced in: | #1006878 - A. I. Game 3.3 / Close The Window [SOLVED] #1006901 - A. I. Game 3.4 / Close The Window If Any [SOLVED] #1006905 - MemorizeBrightBLOB2 (AI) - with similarity threshold (can handle empty solutions) |