Kinect air guitar

Technology

Chris O’Shea emailed in with his super sweet Kinect hack, allowing him to play air guitar!

Written in c++ using openFrameworks and openCV for image processing. Using the ofxKinect addon and the libfreenect driver on Mac. Thank you to the openframeworks and openkinect communities for enabling this to happen. A big thank you to Microsoft for bringing this technology to the mass market.

First it thresholds the scene to find a person, then uses a histogram to get the most likely depth of a person in the scene. Then any pixels closer than the person to the camera are possible hands. It also uses contour extremity finding on the person blob to look for hands in situations where your hand is at the same depth as your body. It only works if you are facing the camera front on. Then it uses one hand as the neck of the guitar, drawing a virtual line from the neck through the person centroid to create the guitar line. The other hand is tracked to see if it passes through this line, strumming the guitar. The neck hand position controls the chord.

2 thoughts on “Kinect air guitar

  1. JCO says:

    So very cool programming on this hack. It’s pretty incredible what Kinect is capable of for $150. I work with vision systems as an engineer and if you were to price a very basic one it’s like $1200, something decently capable is around $10,000.

    The hardware on the Kinnect is in some ways far more advanced. So thank you hacker community for unlocking this hardware! I’m sure I’ll never hack it, but I can definitely appreciate how cool it is.

    Not to take away from what Chris did, it’s a pretty awesome piece of programming!

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Tagged

My interests include writing, electronics, RPGs, scifi, hackers & hackerspaces, 3D printing, building sets & toys. @johnbaichtal nerdage.net

View more articles by John Baichtal

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK