Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Change resize for mask #45

Closed
wants to merge 160 commits into from
Closed

Conversation

zalgo3
Copy link

@zalgo3 zalgo3 commented Aug 19, 2022

Related to Toufool#157

In my environment, this implementation seemed to improve accuracy without losing FPS.

Note, however, that I only tested this by actually playing the game. Do you have another method to evaluate the accuracy? I just recently learned about this software and am sorry for my ignorance of the development process so far.

Avasam and others added 30 commits December 14, 2021 23:10
Also untangled __auto_splitter function
Fixed reset while in pause loop
Missing library and type stub

Let all job matrix complete
@Avasam
Copy link
Owner

Avasam commented Aug 19, 2022

Quick glance at the code. Edit: reread, I think I got it wrong first time around:
This technique really works based on the fact that comparison methods ignore mask (and pHash doesn't really matter here). So you're allowing scaling to something bigger than our usual max.
Makes sense and I like it :)
I think optimally it should scale down the capture region rather than scaling up the split image. Since in the current implementation it still creates more pixels. But that's something I'm willing to have later and merge this now if my tests are concluent.

I don't have the time to test over the weekend. So I'll check this out in details next week.

@Avasam
Copy link
Owner

Avasam commented Aug 19, 2022

I do have some concerns over the scaling. Coercing the ratio to be the same between the captured region and the split image is an intended feature to ensure that:

  1. No parts of the image is missing in the comparison
  2. Unknown how comparison methods will react to different ratios (except pHash, since it scales way down to a small square)
  3. Small inaccuracies in the selection. Or a 8:7 to 4:3 conversion. Won't negatively affect the user.

I also plan on implementing an independant X and Y scale, where the smallest between the region, the split image, or our max is used. So that it doesn't scale up needlessly.

@Avasam
Copy link
Owner

Avasam commented Sep 5, 2022

@zalgo3
Toufool has been merging my progress into the upcoming 2.0 on the main repo. Could you retarget your changes to my 2.0.0 branch instead?
Also, could you split off your changes about mask resizing from the ratio changes? I'd like to merge the former, I'm not sure about the latter because of upcoming plans.

Or I could do the changes myself and tag you as author if you'd like and that's easier for you.

@zalgo3 zalgo3 changed the base branch from temp-disable-auto-reset to 2.0.0 September 6, 2022 05:25
@zalgo3
Copy link
Author

zalgo3 commented Sep 6, 2022

@Avasam
I would appreciate it if you would make the change, as I think it would be less likely for mistakes to occur in resolving conflicts, etc.

Also, I have a few comments. I think cropping is a good idea, but if, for example, we want to refer to objects in the lower left and lower right of the screen, simply cropping may not reduce the amount of computation as much as we think. If we want to take advantage of the sparseness, it might be better to use a data structure such as SparseMat. Just an idea.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants