rancidman Posted July 21, 2015 Share Posted July 21, 2015 There is a bar (with only sides) that is never within predictable coordinates, and is slightly transparent. I need to be able to detect it if it exists, and if it does, its exact coordinates of where it is. To make things more complicated, when no spells are selected, the bar disappears entirely.The bar itself however has a predictable bracket on each side (a "[" and "]" in a brownish colour when there's nothing bright in the background). Please see attached example of 3 different images taken at different times. These are just random samples. As you can see in each case, zoomed out the bar looks the same, but zoomed in the pixel colours of the bar are different. Ignore the 3 circles in the middle, as these change (this is actually what I want to match when I know the relative coordinates of the bar, but these circles can't be matched directly either since they also change colour slightly as they are also slightly transparent). I want to find a way to match the bar wherever it is on the screen with 100% accuracy. From there I can easily deduce the circles, their order, etc.I'm not sure how I can locate the exact location of this bar whenever needed (as mentioned, there are no predictable coordinates for it, it must be matched somehow from scanning the full in-game client window). Things I've tried:1) Using PixelSearch. This fails because there is no pixel anywhere in the bar that keeps its colour. Now, the obvious thing to do is to increase the shading threshold, however there is another problem. The colours in the bar also exist elsewhere as scenery. As the shading threshold is increased, so too are false matches. Even in conjunction with "and" statements, the shading of the bar is as variable as the scenery itself, which is also matched. The only consistent thing is its bracket shape, not its pixel colour.2) Using ImageSearch both for the bar and the circles. Once again this would fail since the colours are changing. As a human it's easy to see the brackets, but I have no idea how to match this consistently with the computer. Could anyone recommend any function? Or, since I assume that programming this script through add-ons wouldn't be an easy task, could someone recommend a good online MOOC or course where I could learn the computer vision necessary (without any prior experience in this field) in order to fulfil this objective of mine?Thanks! circles1.bmp Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 21, 2015 Moderators Share Posted July 21, 2015 rancidman,You appear not to have read the Forum rules since your arrival. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts