I would like to make a robot to automatically play a guitar hero type of game, however all of the notes are the same color. These notes are bright and stand out, so I think that finding the average brightness between two points would be the best way of detecting notes. I am open to new suggestions on how to detect these notes though and any support would be appreciated. I would like to do this project in python, due to how its one of the only coding languages I know. Detecting the color however could work as well, because the notes would be fast, and it shouldn't take more than a millisecond to decide if its a note or not
I already tried googling for my answer, however it seems that there isn't a specific library I should use and there aren't many reputable sources about this topic.
I set up a little code that should get you started at what you want to do. I tried to keep it light on dependencies, but it does require mss for screenshots, PIL for image manipulations and numpy for some numerics.
In brief:
I didn't have rockband, so I looked up a youtube video of someone playing it to get some video, so it should be a pretty close match to your game, credit at the bottom.
Here's the mockup:
When I run that I get:
Here is the calibration points I used approximately:
And here is the calibration graph, where you can see the red lines run straight up each coloured key lane:
And here is the raster lines it generates:
I've annotated it here to show some features of interest:
And that should be enough to get you going!
Credit to this link for the video I tested with: https://www.youtube.com/watch?v=TIs9x8MfROk