AI > MemorizeArea { float similarityThreshold = 0.9f; int shrinkPixels = 1; RGBImage blobImage; static ImageSurface is; Pt lastLocation; void go { // guess Rect guess = null; if (blobImage != null) { guess = foundImgToRect(rgbRawImageSearch_searchHereFirst(image, blobImage, similarityThreshold, lastLocation)); if (guess != null) lastLocation = new Pt(guess.x, guess.y); } // submit Rect solution = first(submit(guess)); // learn if (blobImage == null && solution != null) { blobImage = image.clip(growRect(solution, -shrinkPixels)); if (visualize) is = showZoomedImage(is, "Memorized Area", blobImage); } } }
Began life as a copy of #1006905
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006912 |
Snippet name: | MemorizeArea (AI) - with similarity threshold + optimization for application |
Eternal ID of this version: | #1006912/8 |
Text MD5: | f194a0de420edb61d51227debbae0096 |
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-15 05:57:15 |
Source code size: | 744 bytes / 29 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 470 / 1003 |
Version history: | 7 change(s) |
Referenced in: | #1006908 - A. I. Game 4 / Find The Dice [99.99% SOLVED] #1007093 - A. I. Game 3.5 / Find The Volume Icon [SOLVED] #1007099 - MemorizeArea2 (AI) - takes multiple images #1007100 - MemorizeArea3 (AI) - lowers similarity threshold if needed #1007103 - A. I. Game 3.6 / Start The Audio Mixer In The Popup [solving] |