Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range discrepancy between SL marked target and manually added target #4

Open
automlboss opened this issue Jun 5, 2022 · 2 comments

Comments

@automlboss
Copy link

It appears from testing that SL marks give values that are shorter than expected, resulting in inaccurate shell placement if only using SL marks.

The first image shows an SL marker on a target with calculated values (distance given = 435m). Firing 9 volleys results in all shells missing their mark.
sq1

The second image shows manually ranging with left click drag to target (distance given = 452m). Using these calculated values results in perfect accuracy as the vehicle is destroyed after a few volleys.

sq2

The main difference I can see is the purple line from manual target placement starting in the center of the circle of the mortar emplacement icon, whereas the SL mark green line starts at the barrel end of the emplacement icon, if the the measurement was to start at the direct center of the circle of the icon could the SL mark calculation be more accurate?

@WilliamVenner
Copy link
Owner

I theorized a few approaches to solving this issue, and I'm not really happy with any of them. My hope is that people will just prefer to draw markers themselves, which are always going to be much more accurate.

Approach 1: Template matching at each end point of the line

  • Have to template match for every possible icon that could be at the end of the line
  • The icons might not be perfectly on that point, meaning we'd have to search the surrounding pixels as well, making that very expensive
  • Have to template match for all possible rotations, maybe even the user's chosen map icon scale
  • Even if successful, low confidence that we can effectively find the centre point of each icon (for example, the attack marker's "centre point" is actually near the bottom of the icon)

Approach 2: Edge detection

We could "expand" a "bubble" from the end points of each line until an edge is found. This could potentially "flash fill" in map icons, which we could then calculate the midpoint of, and choose that as the new end point of the line.

  • In practise might not actually be that effective, especially in noisy areas (which is probably where your mortar team is)
  • Too many variables - what's an edge? What thresholds do we use? Where's the midpoint of this icon? What about overlapping icons?
  • What about when there isn't a map marker icon on one end of the line? Noise would probably mess the accuracy of this algorithm up, in this case.

How can the computer turn something like this:

Home-rolled RGB-based edge detection

image

Canny edge detection

image

into map marker icon detection?

Approach 3: Machine learning

This is effectively the nuclear option.

  • Might actually work
  • Bloated binary size
  • Time consuming to train
  • Quite a technical feat
  • Might need retraining for new Squad updates

@automlboss
Copy link
Author

I see... I guess manually adding the targets is the way forward then. If you do ever figure out a way to make it work it'd be a pretty substantial QoL bonus.

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

No branches or pull requests

2 participants