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

Positioning Pinmame/FlexDMD in FullDMD image #448

Open
francisdb opened this issue Jan 28, 2025 · 1 comment
Open

Positioning Pinmame/FlexDMD in FullDMD image #448

francisdb opened this issue Jan 28, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@francisdb
Copy link
Owner

francisdb commented Jan 28, 2025

There is an existing tool that does this:
https://github.com/Le-Syl21/dmd-config

It uses Open Computer Vision to find the hole. However we probably don't want to depend on that and could try a more naive implementation:

  • Divide the image in squares of equal aspect ratio as the image, to be seen how many divisions are needed
  • For each square start at the center, read a pixel, move up down left right (cross) until you find a pixel that does not equal the original pixel + threshold.
  • For all the resulting squares take the biggest one (there will probably be duplicates)
  • Do some checks to make sure we have a square att least x % of the original image

Then for config

  • read vpinball ini
  • find b2s fulldmd position
  • get the scale for the fulldmd image by comparing dimensions
  • scale the biggert square we found
  • configure PinmameDMD and FlexDMD windows according to the found scaled square.

see also vpinball/b2s-backglass#70

@francisdb francisdb added the enhancement New feature or request label Jan 28, 2025
@francisdb
Copy link
Owner Author

francisdb commented Jan 28, 2025

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

No branches or pull requests

1 participant