17
Gesture-based Human-computer Interaction Alen Stojanov [email protected] Electrical Engineering and Computer Science Jacobs University Bremen 28759 Bremen, Germany May 14, 2009 c Jacobs University Bremen, 2009 – p. 1/16

Gesture-based Human-computer Interaction

Embed Size (px)

DESCRIPTION

In daily life, human beings communicate with each other and use broad range of gestures in the process of interaction. Apart of the interpersonal communication, many hours are spent in the interaction with the electronic devices. In the last decade, new classes of devices for accessing information have emerged along with increased connectivity. Inparallel to the proliferation of these devices, new interaction styles have been explored. One major problem is the restrictive human machine interface like gloves, magnetic trackers, and head mounted displays. Such interfaces with excessive connections are hampering the interactivity. This presentation proposes a method to develop a robust computervision module to capture and recognize the human gestures using a regular video camera and use the full potential of these gestures in a user friendly graphical environment.

Citation preview

Page 1: Gesture-based Human-computer Interaction

Gesture-based Human-computerInteraction

Alen Stojanov

[email protected]

Electrical Engineering and Computer Science

Jacobs University Bremen

28759 Bremen, Germany

May 14, 2009

c© Jacobs University Bremen, 2009 – p. 1/16

Page 2: Gesture-based Human-computer Interaction

Contents

Introduction

Prerequisites

Application design and dataflow

Skin Color Segmentation

Skin profile creator

Real-time skin segmentation

Feature Recognition

Gesture Tracking

Discussion and future work

c© Jacobs University Bremen, 2009 – p. 2/16

Page 3: Gesture-based Human-computer Interaction

Introduction

Figure 1: The gesture-based devices available today

In the last decade, new classes of devices for accessing information have emergedalong with increased connectivity. In parallel to the proliferation of these devices, newinteraction styles have been explored. One major problem is the restrictive humanmachine interface like gloves, magnetic trackers, and head mounted displays. Suchinterfaces with excessive connections are hampering the interactivity.

This presentation introduces a method to develop a robust computer vision module tocapture and recognize the human gestures using a regular video camera and use the fullpotential of these gestures in a user friendly graphical environment.

c© Jacobs University Bremen, 2009 – p. 3/16

Page 4: Gesture-based Human-computer Interaction

Prerequisites

(a) OpenGL (b) Qt (c) V4L

OpenGL (Open Graphics Library) is a standard specification defining across-language, cross-platform API for writing applications that produce 2D and 3Dcomputer graphics. OpenGL routines simplify the development of graphics software.

Qt is a cross-platform application development framework, widely used for thedevelopment of GUI programs and also used for developing non-GUI programs suchas console tools and servers.

Video4Linux or V4L is a video capture application programming interface for Linux. Itis closely inegrated into the Linux kernel and provides support for many USB(Universal Serial Bus) video input devices.

c© Jacobs University Bremen, 2009 – p. 4/16

Page 5: Gesture-based Human-computer Interaction

Design and dataflow

ImageBuffer: Processed Images

GestureBuffer: Processed Gestures

ImageBuffer: Raw Images

EngineThread

GestureThread

CamThread

V4L

V4L2

RawDisplay

ProcessedDisplay

OpenGLDisplay

/dev/video* - video driver

Figure 2: Design and dataflow in GMove

The OpenGL architecture is structured as a state-based pipeline. A similar approachis used in the implementation of GMove, such that a rasterized image is beingvectorized with the purpose of extracting the semantic of the image.

A highly threaded aproach has been used to synhronize and avoid delayed gesturesobtained from the input stream The data share between the threads is stored inspecial buffers, the command control is done via callback functions provided by Qt.

c© Jacobs University Bremen, 2009 – p. 5/16

Page 6: Gesture-based Human-computer Interaction

Design and dataflow (2)

The system is consisted of 3 threads:

CamThread – responsible for reading the video input stream directly from the driver

EngineThread – this module receives the raw image input from the camera,processes the image and parses the position of the hands and their state.

GestureThread – the hand gestures obtained from the EngineThread are usedin a process where the transitions from the previous image, stored in the gesturebuffer, are mapped to the new image frame and an appropriate action is beinginvoked accordingly.

The data share is given with the following buffers:

RawImage – stores the input stream obtained in the CamThread.

ProcessedImage – stores the processed output generated from theEngineThread

GestureBuffer – stores the gestures provided by the GestureThread

c© Jacobs University Bremen, 2009 – p. 6/16

Page 7: Gesture-based Human-computer Interaction

Skin color segmentation

The RGB (Red, Gree and Blue) color space alone is not reliable for identifyingskin-colored pixels, it represents not only color but also luminance

HSV (Hue, Saturation, and Value) and HSI (Hue, Saturation and Intensity) colorspace models emulate the colors in the way that humans perceive them; thereforethe luminance factor in the skin determination can be minimized.

Charged Coupled Devices (CCD) or Complementary Metal Oxide Semiconductor(CMOS) sensors are used in the most video input devices. There are majordifferences in the operation of these sensors during daylight and during artificiallight, especially in the exposure time. The prolonged exposure time, required duringartificial light, is a source of image noise and this noise should be taking intoconsideration in the process of skin segmentation.

A “skin profile generator” is being implemented as skin color classifier to handledifferent light modes and different race colors.

c© Jacobs University Bremen, 2009 – p. 7/16

Page 8: Gesture-based Human-computer Interaction

Skin color segmentation (2)

0 50

100 150

200 250

300 350 0

20

40

60

80

100

0

20

40

60

80

100

(a) Daylight

0 50

100 150

200 250

300 350 0

20

40

60

80

100

0

20

40

60

80

100

(b) Artifical light

Figure 3: 3D Histogram of skin pixel frequencies in HSI color space

The perception of the video input device is quite different during daylight and artificallight.

c© Jacobs University Bremen, 2009 – p. 8/16

Page 9: Gesture-based Human-computer Interaction

Skin profile creator

Figure 4: Skin profile creator

When the user clicks on a certain part of the acquired image, a flood fill algorithm isused to traverse through the skin pixels with a low threshold in the color pixeldifference. The top 20 most frequent pixels are then written in the user profile.

c© Jacobs University Bremen, 2009 – p. 9/16

Page 10: Gesture-based Human-computer Interaction

Real-time skin segmentation

Figure 5: Skin color segmentation

The real-time skin segmentation is a brute-force method, applied to all the pixel ofthe captured image frame.

The pixels are then compared to the 20 values stored in the user profile. If the pixelsare in the range defined by the threshold, then the pixel is classified as a skin,otherwise it is ignored.

Noise is being removed using a discreet Gaussian filter.

c© Jacobs University Bremen, 2009 – p. 10/16

Page 11: Gesture-based Human-computer Interaction

Real-time skin segmentation

Gaussian function has the form:

G(x, y) =1

2πσ2e−

x2+y

2

2σ2

the Gaussian smoothing can be performed using standard convolution methods. Aconvolution mask is usually much smaller than the actual image. For example aconvolution mask with σ = 1.4 and mask width k = 4 has the following form:

M(σ, k) =1

115

0

B

B

B

B

B

B

B

@

2 4 5 4 2

4 9 12 9 4

5 12 15 12 5

4 9 12 9 4

2 4 5 4 2

1

C

C

C

C

C

C

C

A

The larger the width of the Gaussian mask, the lower is the sensitivity to noise and thehigher is the computing complexity.

c© Jacobs University Bremen, 2009 – p. 11/16

Page 12: Gesture-based Human-computer Interaction

Feature Recognition

Figure 6: Distinct regions and bounding box

Two or more hands are allowed to be captured by the video stream. The featurerecognition is applied to every hand separately.

Flood-fill algorythms is used for identifying the the distinct hand regions. Thebounding box and the weighted center of the regions is determined.

If there is intersection between two bounding boxes, such that the center of one ofthe boxes lies inside the other bounding box, the boxes are merged together.

c© Jacobs University Bremen, 2009 – p. 12/16

Page 13: Gesture-based Human-computer Interaction

Feature Recognition(2)

Figure 7: Hand state using concentrical circles

The hands can have any orientation in the video input stream and the method todetermine the state of the hand should be robust towards all cases.

A geometrical model is generated by analyzing the skin pixels intersections whenconcentric circles are drawn in each of the bounding boxes.

The far most intersection points define the fingertips of the hand.

c© Jacobs University Bremen, 2009 – p. 13/16

Page 14: Gesture-based Human-computer Interaction

Gesture Tracking

The recognized feature will only denote the state of the hand, and the hand movementcan denote the amount of action that is influenced to the current state. In the currentimplementation of the feature extraction, the system is able to differentiate two handstates:

Fist (the palm has all the fingers “inside”) which denotes the idle mode

The fingers of the palm are stretched outside which denotes the active mode

For every newly obtained image frame, a match of the hand bounging box with theprevious frames is being performed. The matching is defined with the following criteria:

Distance between the weighted centers of two bounding boxes

The difference of the amount of skin pixels between the bounding boxes

The difference of the size of the bounding box

With this implementation, the system is able to issue commands to move the scene inevery direction, as well as zoom and and zoom out.

c© Jacobs University Bremen, 2009 – p. 14/16

Page 15: Gesture-based Human-computer Interaction

Discusion and future work

Developing a system such as GMove is a challenging task, especially for all thetechnical implementations required to get started and create a basic environmentwhere the logic of the program is applied.

GMove is able to understand basic hand gestures, is able to track this gestures inreal-time, and has a linear computing complexity.

Although the application has already a handful of nifty features to offer, it is by nomeans a full–fledged system able to be used in the daily human to computercommunication.

The ultimate challenge of this project would be a design of a very intuitive humaninteraction system, available in the futuristic science fiction movies

One idea of further development is extending the system to use two or morecameras, such that a stereoscopic view is created and a real 3D model of the handis being created from the input.

c© Jacobs University Bremen, 2009 – p. 15/16

Page 16: Gesture-based Human-computer Interaction

Acknowledgment

I would like to express my gratitude to my supervisor, Prof. Dr. Lars Linsen who wasabundantly helpful and offered invaluable assistance, support and guidance. Thisresearch project would not have been possible without his support.

Deepest gratitude to Prof. Dr. Heinrich Stamerjohanns, his knowledge, advices anddiscussions invaluably shaped my course of work and study.

Any questions, please?

c© Jacobs University Bremen, 2009 – p. 16/16

Page 17: Gesture-based Human-computer Interaction

16-1