• 沒有找到結果。

The Integration of Color Image Processing and Virtual Reality in the Application of Virtual Boxing Match

N/A
N/A
Protected

Academic year: 2021

Share "The Integration of Color Image Processing and Virtual Reality in the Application of Virtual Boxing Match"

Copied!
5
0
0

加載中.... (立即查看全文)

全文

(1)

The Integration of Color Image Processing and Virtual Reality in the

Application of Virtual Boxing Match

I-Pin Chen, Wei-Xiang Zhao, Jun-Jun Liao

Dept. of Computer Science and Information Engineering, Saint John’s University

E-mail: ipinchen@mail.sju.edu.tw

Abstract

- Here in this paper, we propose a new method for the playing of digital game. We want to get ride of the limitation of traditional digital game in this method, that is, we use no keyboard, mouse, joystick, etc. Our system uses digital camera to get image, then operate image processing on these images. The result of analysis is rendered by virtual reality technique with example of boxing game.

Keywords

: Image processing; Virtual reality; Digital game.

1. Introduction

Today computer game has become one of popular leisure. Traditional computer game takes keyboard, mouse, joystick, etc., as its control units. As a result, the player tends to lack of body activity, and hence may affect his health. Therefore we try to make some new game operation methods for the game playing. In order to get ride of the inconvenience of those traditional control units, we combine the techniques of color image processing with virtual reality in the application of virtual boxing game. That is, using digital camera to catch image, then using image processing techniques [1-3] to analyze the motion information of player in the image. The result is shown with virtual reality in the form of boxing game.

Virtual reality is a special media for the user to enter the virtual world. It uses computer simulation to generate images of virtual environment in 3D space form. These images will create illusion in our brain. Virtual reality allows man to interact with virtual reality any time and any place. The application of virtual reality varies widely [4-6]. For examples, there are entertainment and training simulation these two applications in our system. Image processing is used to get the position and trajectory information of boxing gloves. To allow the player playing boxing with the

virtual opposite boxer, that is, attack and defense, is the purpose of this research.

The architecture and game playing process is given in Section 2. The image processing is described in Section 3. Then Section 4 describes the virtual reality used in this system. Finally, the experimental result and conclusions are given in Section 5.

Fig. 1: System architecture.

Player Image Input Image processing Set Attribute Get Attribute Virtual opposite boxer Game playing Virtools Display

(2)

2. System Architecture

The architecture of this system is shown in Fig. 1. First, the images fetched by digital camera are analyzed by the color image processing to get the position information of the boxing helmet and boxing gloves. The position information will be transferred to the other part of the system, to perform the virtual boxing game, which is generated by the software package Virtools. In the virtual reality, there will have a virtual opposite boxer with artificial intelligence (AI) ability to play boxing. For example, if the player wants to hit the virtual opposite boxer, the virtual opposite boxer will try to duck. If virtual opposite boxer is hit, he will bend to the other side. The progress of game will be displayed by 3D virtual reality.

Fig. 2: Game playing process.

Fig. 2 shows the game playing process of this virtual boxing game. First, the digital camera captures the image of the player. Determine the positions of both the right and left boxing gloves. Determine whether the player has strike to attack the virtual opposite boxer? Then we calculate the heart-point amount (i.e., blood amount remaining) according to the result of strikes of both virtual opposite boxer and player. Finally, according to the heart-point amount, determine who is the winner, the player or the virtual opposite boxer? The criterion is to check which one of the two heart-point amounts has decreased to zero?

Fig. 3: HSV color model [7].

3. Image Processing

3.1. Image Analysis

The input device of this system is a digital camera. The image processing can be considered as (1) image enhancement and segmentation, (2) feature extraction, and (3) image description.

Due to boxing helmet (or head scarf) and boxing gloves are usually brilliant color, we choose the bright blue and bright red pixels in the image as the feature, and hence simplify the image enhancement process. In the HSV color model (refer to Fig. 3), H value represents the hue information. H=0 means red color; H=120 means green color; and H=240 means blue color. S value represents the saturation information. S=1 means bright color; S=0 means the image is a gray image. For example, H=0, S=1 means a bright red pixel. The V value in the HSV model represents the intensity value information. V=1 means white color; V=0 means black color.

In the process of image enhancement and segmentation, we use the HSV color model to fetch bright blue and bright red pixel (refer to Fig. 4). Then these pixels are translated into binary image (refer to Fig. 5). The HSV color model is chosen because the H (hue) value is not affected by the light intensity.

Player action Detect if hit? Count heart_point Is heart_point of player = 0? Virtual opposite boxer action Win. Game over. Fail. Game over. Is heart_point of virtual opposite boxer = 0? Y N Y N

(3)

Fig. 4: Using HSV model to fetch blue or red pixels.

Fig. 5: Translated into binary image.

Fig. 6: Image after noise reduction.

Fig. 7: Center coordination (x,y) and area.

3.2. Feature Extraction

After we get the blue and red pixels in the HSV image, and translated into binary image, then we use erode operation to eliminate the noise (refer to Fig. 6). The pixels after noise elimination are calculated to get the information of area and center position of each block (refer to Fig. 7).

Fig. 8: ROIs defined in this system.

Fig. 9: Image analysis process.

The identification of the type of punch (e.g., straight strike, duck, etc.) is based on the regions of interest (ROI) we defined in Fig. 8. There are boxing helmet (H), right boxing glove (R), left boxing glove (L) in the image. We identify their area values and center positions by image processing. When the center position of right (or left) glove transit from one ROI to another ROI, we can determine the corresponding type of punch.

3.3. Image Description

We get the images captured by digital camera one by one, and fetch the feature values of bright blue and bright red pixels in the image (refer to Fig. 9). Calculate

Feature parameters

I

k

H

a

, I

k

H

x

, I

k

H

y

,

I

k

R

a

, I

k

R

x

, I

k

R

y

,

I

k

L

a

, I

k

L

x

, I

k

L

y

,

Detect the type of

punch according to

ROIs.

(4)

the center coordinate value and area value (x,y,a) of these pixels. Then each (x,y) coordinate value is checked whether it is in the ROIs we defined to determine the type of punch. The output is a set of activity code (e.g., straight strike, duck, etc.) indentify the corresponding type of punch. This information is used in the virtual reality.

4. Virtual Reality

The activity code resulted after the image processing is used in the playing of virtual boxing game. The result is rendered by virtual reality which is constructed by software packages 3ds max and Virtools.

We use 3ds max to make the role action. In this part, for the purpose of making the role action more fluently, besides the single action, we generate some continuous actions (e.g., duck and then strike back) in the creation of role action. The single actions and continuous actions are interleaving to increase the action fluency.

About role control, in order that the result of image processing can be transferred to Virtools and to control the action of the role, we need to build a channel (or window) in Virtools. The channel is build by changing the attribute of object in Virtools. The result of image processing is transferred to Virtools via this channel and then affects the action of player role.

Fig. 10: Role activity.

(a)

(b)

Fig. 11: (a) Output straight strike. (b) Output right duck.

5. Experimental Result and Conclusions

The demonstration is shown in Fig. 11. The techniques used in this project, image processing and virtual reality, can be extended to other applications. (1) Using digital camera to catch the action of user, instead of tedious keyboard or mouse input. (2) It can be used in the control of remote meeting or video conference. (3) Making the PC more convenient to use for some handicapped person.

Acknowledgement

This research is supported by NSC 95-2221-E-014-021.

(5)

References

[1] R. C. Gonzalez and R. E. Woods, Digital image processing 2/e. Prentice Hall, N.J. 2002.

[2] D. H. Ballard and C. M. Brown, Computer Vision. Prentice Hall, N.J. 1982.

[3] J.R. Parker, Algorithms for Image Processing and Computer Vision, Wiley, New York, 1996.

[4] H.-M. Sun and W.-L. Cheng, “The Input-Interface of Webcam Applied in the Digital Content Interaction, ” Intelligent Information Hiding and Multimedia Signal Processing, 2007, IIHMSP 2007, Third International Conference on, Vol. 1, pp. 31– 34, 26-28 Nov. 2007.

[5] P. H. Wilson, J. Duckworth, N. Mumford, R. Eldridge, M. Guglielmetti, P. Thomas, D. Shum, H. Rudolph, “A virtual tabletop workspace for the assessment of upper limb function in Traumatic Brain Injury (TBI),”Virtual Rehabilitation, 2007, pp. 14-19, 27-29 Sept. 2007

[6] A. Y. Nanyue, B. H. Hanwu, C. L. Yan, D. L. Yongming, “Modeling of virtual traffic environment for driving simulator,” Computer-Aided Industrial Design and Conceptual Design, 2006, CAIDCD '06, 7th International Conference on, pp. 1-5, 17-19 Nov. 2006.

數據

Fig. 1: System architecture.
Fig. 2 shows the game playing process of this virtual boxing game. First, the digital camera captures the image of the player
Fig. 6: Image after noise reduction.
Fig. 11: (a) Output straight strike. (b) Output right duck.

參考文獻

相關文件

refined generic skills, values education, information literacy, Language across the Curriculum (

Wang, Solving pseudomonotone variational inequalities and pseudocon- vex optimization problems using the projection neural network, IEEE Transactions on Neural Networks 17

volume suppressed mass: (TeV) 2 /M P ∼ 10 −4 eV → mm range can be experimentally tested for any number of extra dimensions - Light U(1) gauge bosons: no derivative couplings. =>

Define instead the imaginary.. potential, magnetic field, lattice…) Dirac-BdG Hamiltonian:. with small, and matrix

incapable to extract any quantities from QCD, nor to tackle the most interesting physics, namely, the spontaneously chiral symmetry breaking and the color confinement.. 

• Formation of massive primordial stars as origin of objects in the early universe. • Supernova explosions might be visible to the most

The difference resulted from the co- existence of two kinds of words in Buddhist scriptures a foreign words in which di- syllabic words are dominant, and most of them are the

(Another example of close harmony is the four-bar unaccompanied vocal introduction to “Paperback Writer”, a somewhat later Beatles song.) Overall, Lennon’s and McCartney’s