This paper presents a human-computer interaction system and realizes a real-time virtual mouse. Our system emulates the dragging and selecting functions of a mouse by recognizing bare hands, hence the control style is simple and intuitive. A single camera is used to capture hand images and a DSP chip is embedded as the image processing platform. To deal with complex backgrounds, particularly where skin-like or moving objects appear, we develop novel hand recognition algorithms. Hand segmentation is achieved by skin color cue and background difference. Each input image is corrected according to the luminance and then skin color is extracted by Gaussian model. We employ a Camshift tracking algorithm which receives feedbacks from the recognition module. In fingertip recognition, a method combining template matching and circle drawing is proposed. Our system has advantages of good real-time performance, easy integration and energy conservation. Experiments show that the system is robust to the scaling and rotation of hands.