The plugin takes screenshots of the Hearthstone window and uses this visual information to detect game states, cards and heroes. The plugin doesn’t use memory reading functions and it doesn’t inject data or code into the Hearthstone process. Lets say we have a hashing function that takes an image and returns a 64-bit number that represents the image. Two different images will result in two different hash numbers. If we have two images that are almost the same, the two hashes will also be almost the same. So we can use the hashing function to compare two images and find out how similar they are. If we know the exact position of the visual elements we want to detect, and we know what the visual hashes of these elements should be, we can try to detect them. This requires us to precompute all of the perceptual hashes that we want to detect. The image below shows how Arena Helper tries to detect the Hearthstone game state and the heroes. The red rectangles indicate the location of the visual elements we want to detect. These locations are defined in the code of the plugin and the visual hashes of the elements are precomputed and stored in a database. The image in the top rectangle shows us if we are in the arena state. The bottom rectangles represent the position and size of the heroes. The visual hashes of the three heroes are calculated and the hashes are matched against the hashes stored in the database. If the hashes are close enough, we have detected the heroes. We define the exact location and size of the visual elements in the code of Arena Helper. This information is only correct for a specific resolution. If the resolution is changed, we need to convert our stored locations to be compatible with the new resolution.įor example, we can define a rectangle that indicates the location and size of the first hero portrait in the image above. The code examples below will be using C#. #How to download hearthstone deck trackers code# #How to download hearthstone deck trackers code#.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |