Blog Archives

Motion Gaming using Opencv and SDL lib

hello every one ,I hope every one has gone through my previous post on embedded gaming .If not please check it out to get some idea about embedded gaming.In this post i am going to write about a weekend project of mine which was inspired from the PLAYSTATION MOVE MOTION CONTROLER from sony. This is a very small attempt of mine to do some thing.

This time i have controlled the Egg Man game which you people have allready seen  in my previous post using the motion of the tennis ball in my hand .

Basically it is motion gaming which enables the game running on the PC to be controlled  according to the motion of  the unique colored ball on stick in the players hand.The first step to solve the problem statement is to be able to track the motion of the  ball with the help of image processing .i achieved the first step using opencv an open source cross platform image processing library.

Step two is to control the game using the control inputs from the image processing part of the code and moving the player on screen accordingly.This step is quite simple just redrawing the player on the game arena at a new position and adding some lines of code pertaining to the game logic makes it done.

If you wish to add sound to your game this can also be done using the sdl

i have attached the video of the game which is been controlled using the motion of the user