milankarman / Unload

An advanced automatic speedrun load time remover for community verifiers.
GNU General Public License v3.0
31 stars 0 forks source link

Masking frame/loading in image file as comparison #4

Open DVark09 opened 3 years ago

DVark09 commented 3 years ago

Being able to either add an image with an alpha channel or modifying a frame to check for the exact thing you are looking for would help in my opinion. The run I'm trying it on has a static load text but there are different backgrounds behind the text every time, making the similarity go down and getting the desired time periods hard.

milankarman commented 3 years ago

Great idea. This is definitely something I would like to add, though I'm not sure how much new work and how many changes this would need yet. Could you let me know what the game you're talking about here is? I'd like to use videos of it for testing for when I get to this.

DVark09 commented 3 years ago

I guess the easier solution would be to allow uploading images and then just using the same coparison. Probably to allow alpha channels some modification needs to be done, but I'm guessing it wouldn't be that bad. Maybe it wouldn't even require anything at all, if your codebase can handle transparency (I haven't checked code, sorry) I saw this being implemented on the image autosplitter (Auto-split) but that was written in Python. Maybe if I have some free time I'll try to see how that works. The game I was testing on is called Sniper: Path of Vengeance

milankarman commented 3 years ago

Thanks for letting me know. I have some ideas on how to implement this but I'll just have to try them and see if they work haha.

Avasam commented 2 years ago

If you need some inspiration for implementation, feel free to checkout how AutoSplit does it! https://github.com/Toufool/Auto-Split/blob/2.0.0/src/compare.py

Do note that perceptual hash tends to be inaccurate with masking.

milankarman commented 2 years ago

If you need some inspiration for implementation, feel free to checkout how AutoSplit does it! https://github.com/Toufool/Auto-Split/blob/2.0.0/src/compare.py

Do note that perceptual hash tends to be inaccurate with masking.

Thanks for the tip. I'm not sure I want to add this anytime soon as demand for it pretty much seems to have disappeared and it seemed like a lot of work (that also didn't fit any of my personal use cases). I could definitely change my mind on it though if there's more demand.