1. Introduction
What is camera interactive games? Camera interactive games use cameras as input devices to replace traditional keyboard and handle input, so that players can be more integrated into the game. Many companies in China are currently engaged in camera interaction technology (including projection and games ).
Http://www.eyebobi.com/
Http://www.interjoy.com.cn
Http://www.interactiveprojection.co.uk/
Http://www.eyeclick.com/
Most companies use this technology in interactive projection, gaming, and other related fields at the same time. Currently, interactive projection is widely used, and games are rarely used.
2. Principles
The principle of using the camera as the interactive input is to analyze the movements or movements of players through the sequence frames captured by the camera to achieve the input goal. (See hardant's blog-capturing Human Motion and Human Motion Analysis Based on Video Sequences)
3. Implementation
Analysis of the data collected by cameras requires the knowledge of image processing. Fortunately, it is easy to have robust opencv to support everything.
Http://en.wikipedia.org/wiki/OpenCV
Http://www.opencv.org.cn/index.php/homepage
These functions include motion object detection, face recognition, Color Block tracking, and contour detection. All we need to do is to integrate it with our games. You can see that the basic process can be implemented as follows:
Data acquisition and analysis
1. Use ds to obtain camera data (use the grabber filter to directly obtain RAM)
2. Use opencv to analyze the obtained data to obtain the desired result.
Data acquisition and use
1. Use polypolygons, a typical polygons data structure, to store and use data.
For the most required function collision detection, refer to the article on collision detection and response based on 2D Polygon
Or directly use the physical engine.
In this way, you can use other display libraries and game engines to develop interactive games.
4. Problem
The unstable data obtained by the camera changes during each update. In this case, the collision detection is inaccurate; changes in the player background will also lead to a reduction in the ease of operation and playability of the game. (It is best to buy a game with a green screen)
Currently, this interactive technology is only used for simple games and interactive projection. It is too slow for games with strong interactivity.