Method for Computing Poses of Keys
- Computer vision strategy:
- Compute the pixel positions of each key using computer vision.
- Compute the homography matrix mapping pixel positions to physical poses.
- This strategy has the potential to need no AR tags, which would make it more robust; however, we tried to manually compute a 4 point homography by getting the pixel centers and physical poses of 4 AR tags.
- When implementing this strategy, we ran into complications, discussed here, so we decided to try the more viable AR tag strategy.
- AR tag strategy:
- As described in the "Design We Chose" section, compute the fixed offsets from each key to an AR tag.
- At first, we used one large AR tag on the right side of the piano.
- For increased accuracy, we switched to two small AR tags. The pose of each key can be computed relative to the closest AR tag, so the average distance from AR tag to key is shorter. This means there is less room for measurement error to build up.
- This strategy was simple and sufficiently reliable, so we went with it in our final design.