4rtzel / poe-archnemesis-scanner

Tool for Path of Exile game to automatically scan Archemesis inventory and display related information
Apache License 2.0
64 stars 25 forks source link

add test cases, fix window sizing issues, update to grid-storage #42

Open meepen opened 2 years ago

meepen commented 2 years ago

I have tested and squashed #35 after finalizing and testing with the images I have taken, as well as created test cases.

The current test cases are likely not enough however, and raw PNG screen captures of your game would help. If you would like to help, take a few pictures of you in your archnemesis tab at different resolutions.

This also lowers the default confidence level to 0.5 to catch the large images (Innocence-Touched, etc.)

This also starts to scan entire image but masking out the area with levels are.

eskoONE commented 2 years ago

would it help if i provided screenshots of my game that is running in either 1920x900 or 1920x1032? can also do some 1920x1080.

edit:

these are just normal screenshots since i dont know what raw pngs are.

https://i.imgur.com/bIZKrUV.jpeg 1920x900 https://i.imgur.com/YBcIais.jpeg 1920x1032

kevindevm commented 2 years ago

https://i.imgur.com/HKMPsJe.png 1280x1024 https://i.imgur.com/xvAj7QA.png 1920x1080

edit:

btw maybe this help you to simulate other resolutions here you have a simulated 4k resolution https://drive.google.com/file/d/1erIfrhxW4Pt9f_daTEu5nfwCSn_MSwX8/view?usp=drivesdk

#H::
InputBox, dy,X Y W H
if errorlevel 
    return 
t_:=StrSplit(dy,[a_space,a_tab,",",":"])
WinSet, Style, -0xC00000, ahk_class POEWindowClass
WinSet, Style,  -0xC40000 , ahk_class POEWindowClass
WinMove, ahk_class POEWindowClass, , t_[1], t_[2], t_[3], t_[4]
Return
meepen commented 2 years ago

@kevindevm Thanks! I've added your test cases to the file and thankfully there was no issue with them off the bat. The extra resolution idea is nice, but I think I can just upscale my monitor with my graphics drivers settings. @eskoONE Unfortunately, the JPEG format creates artifacts in the image which the scanner does not like. If you can create PNG files instead (don't convert the jpeg into png!) I will be able to use them.

kevindevm commented 2 years ago

so you need screenshot png from game at any resolution but with diferent organs right? dont want my same organs as other resolution if that's not the case just tell me what resolutions would u want and i will upload the png to google drive

meepen commented 2 years ago

I would need multiple screenshots of the same exact inventory in different resolutions, having a lot of different parts will help improve the tests' reliability

kevindevm commented 2 years ago

3840x2160.png 3440x1440.png 2560x1440.png 2048x1536.png 3840x1080.png 2560x1080.png 2048x1152.png 1920x1200.png 1680x1050.png 1600x900.png 1440x900.png 1536x864.png 1280x960.png 1280x800.png 1366x768.png 1360x768.png 1280x720.png 1024x768.png

meepen commented 2 years ago

2560x1440 is showing the areas on the map, but I am adding the tests and fixing a few problems. Thanks!

eskoONE commented 2 years ago

https://i.imgur.com/2Z4t4mC.png 1920x900 https://i.imgur.com/ENxO3jz.png 1920x1032 https://i.imgur.com/DgHurDa.png 1920x1080

im not sure if imgur uses compression or not. let me know if it does pls.

meepen commented 2 years ago

So with this next commit, I've noticed that Mana Siphoner (low resolutions at least) has problems with being identified because the majority of it is behind text.

Arakaali and Shakari are too similar to the algorithm due to having a large skull and general same color, so it's not going to be able to discern them perfectly. Every test case besides the one provided by @eskoONE has been successful.

The failures are as follows:

4_1920x900: 1x2 found Arakaali-Touched expected Shakari-Touched 0.7729188799858093
  found item was 0.6063586732615596
4_1920x900: 2x6 found Treant Horde expected Mana Siphoner 0.7718945741653442
  found item was 0.6874000549316406
4_1920x1032: 1x2 found Arakaali-Touched expected Shakari-Touched 0.7025519013404846
  found item was 0.5296416386314061
4_1920x1080: 1x2 found Arakaali-Touched expected Shakari-Touched 0.7541437149047852
  found item was 0.5634184505628503
eskoONE commented 2 years ago

i was thinking about something, is it possible that using medium texture quality in poe has an effect on the outcome of the tests you are running? i dont know if the textures for the ui change or not.

eskoONE commented 2 years ago

i made new screenshots with texture quality on high this time and uploaded the screenshots directly here.

1920x900 1920x1032 1920x1080

kevindevm commented 2 years ago

i made new screenshots

you can tell tha game to screenshot with F8 the png will go to my docs/my games/path of exile/screenshots

meepen commented 2 years ago

It's a good question whether the texture quality affects the results, I don't have time anytime recently and have not been able to test with the new ui changes unfortunately. I will proceed with testing this this weekend.

4rtzel commented 2 years ago

@meepen, I partially implemented some of your changes here: 9d0c67e because the tool became barely usable with the latest PoE changes. I removed scanning window setting and started using calculations to locate its position. I also started using your "best match per slot" idea to improve results accuracy. I hope you don't mind that given I was in a hurry to fix that.